~indicator-applet-developers/indicator-appmenu/trunk.13.04

« back to all changes in this revision

Viewing changes to src/hudappindicatorsource.c

* Upstream Merge
  * GMenuModel menu support

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
  const gchar *dbus_name;
82
82
  const gchar *dbus_path;
83
83
  GSequenceIter *iter;
 
84
  const gchar *id;
84
85
  gint32 position;
85
86
  gchar *title;
86
87
 
87
88
  g_variant_get_child (description, 1, "i", &position);
88
89
  g_variant_get_child (description, 2, "&s", &dbus_name);
89
90
  g_variant_get_child (description, 3, "&o", &dbus_path);
 
91
  g_variant_get_child (description, 8, "&s", &id);
90
92
  g_variant_get_child (description, 9, "s", &title);
91
93
 
92
94
  if (title[0] == '\0')
93
95
    {
94
 
      const gchar *id;
95
 
 
96
96
      g_free (title);
97
97
      /* TRANSLATORS:  This is used for Application indicators that
98
98
         are not providing a title string.  The '%s' represents the
99
99
         unique ID that the app indicator provides, but it is usually
100
100
         the package name and not generally human readable.  An example
101
101
         for Network Manager would be 'nm-applet'. */
102
 
      g_variant_get_child (description, 8, "&s", &id);
103
102
      title = g_strdup_printf(_("Untitled Indicator (%s)"), id);
104
103
    }
105
 
  g_debug ("adding appindicator at %d ('%s', %s, %s)", position, title, dbus_name, dbus_path);
 
104
  g_debug ("adding appindicator %s at %d ('%s', %s, %s)", id, position, title, dbus_name, dbus_path);
106
105
 
107
 
  collector = hud_dbusmenu_collector_new_for_endpoint (title, hud_settings.indicator_penalty, dbus_name, dbus_path);
 
106
  collector = hud_dbusmenu_collector_new_for_endpoint (id, title, hud_settings.indicator_penalty,
 
107
                                                       dbus_name, dbus_path);
108
108
  g_signal_connect (collector, "changed", G_CALLBACK (hud_app_indicator_source_collector_changed), source);
109
109
 
110
110
  iter = g_sequence_get_iter_at_pos (source->indicators, position);