Updating branch refs/heads/master to 24788ad2952d8afc4e2135d176bd62a7755a3d87 (commit) from c40c282be0037c4de230fc7178c786a5fbab3689 (commit)
commit 24788ad2952d8afc4e2135d176bd62a7755a3d87 Author: Andrzej <ndrwr...@gmail.com> Date: Thu May 10 23:47:10 2012 +0900 Fixed compilation warnings The remaining ones: /usr/local/include/libindicator-0.4/libindicator/indicator-object.h:190:13: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] come from libindicator headers. panel-plugin/indicator-box.c | 11 -------- panel-plugin/indicator-button.c | 4 --- panel-plugin/indicator.c | 55 +++++++++++++++++++++----------------- 3 files changed, 30 insertions(+), 40 deletions(-) diff --git a/panel-plugin/indicator-box.c b/panel-plugin/indicator-box.c index 78567b4..854f4a4 100644 --- a/panel-plugin/indicator-box.c +++ b/panel-plugin/indicator-box.c @@ -166,7 +166,6 @@ xfce_indicator_box_get_property (GObject *object, GParamSpec *pspec) { XfceIndicatorBox *box = XFCE_INDICATOR_BOX (object); - GPtrArray *array; switch (prop_id) { @@ -194,9 +193,6 @@ xfce_indicator_box_set_property (GObject *object, { XfceIndicatorBox *box = XFCE_INDICATOR_BOX (object); gint val; - gint size; - XfceIndicatorButton *child; - GSList *li; switch (prop_id) { @@ -232,8 +228,6 @@ xfce_indicator_box_set_orientation (XfceIndicatorBox *box, GtkOrientation orientation) { gboolean needs_update = FALSE; - XfceIndicatorButton *child; - GSList *li; g_return_if_fail (XFCE_IS_INDICATOR_BOX (box)); @@ -264,9 +258,6 @@ xfce_indicator_box_set_size (XfceIndicatorBox *box, gint nrows) { gboolean needs_update = FALSE; - XfceIndicatorButton *child; - GSList *li; - gint size; g_return_if_fail (XFCE_IS_INDICATOR_BOX (box)); @@ -310,8 +301,6 @@ xfce_indicator_box_add (GtkContainer *container, GtkWidget *child) { XfceIndicatorBox *box = XFCE_INDICATOR_BOX (container); - XfceIndicatorButton *button = XFCE_INDICATOR_BUTTON (child); - gint size; g_return_if_fail (XFCE_IS_INDICATOR_BOX (box)); g_return_if_fail (GTK_IS_WIDGET (child)); diff --git a/panel-plugin/indicator-button.c b/panel-plugin/indicator-button.c index 97e26d3..ef8fa56 100644 --- a/panel-plugin/indicator-button.c +++ b/panel-plugin/indicator-button.c @@ -278,8 +278,6 @@ xfce_indicator_button_set_label (XfceIndicatorButton *button, static void on_pixbuf_changed (GtkImage *image, GParamSpec *pspec, XfceIndicatorButton *button) { - GdkPixbuf *pixbuf; - g_return_if_fail (XFCE_IS_INDICATOR_BUTTON (button)); g_return_if_fail (GTK_IS_IMAGE (image)); g_return_if_fail (XFCE_IS_PANEL_IMAGE (button->icon)); @@ -293,8 +291,6 @@ void xfce_indicator_button_set_image (XfceIndicatorButton *button, GtkImage *image) { - GdkPixbuf *pixbuf; - g_return_if_fail (XFCE_IS_INDICATOR_BUTTON (button)); g_return_if_fail (GTK_IS_IMAGE (image)); diff --git a/panel-plugin/indicator.c b/panel-plugin/indicator.c index 88f4d42..09aab6a 100644 --- a/panel-plugin/indicator.c +++ b/panel-plugin/indicator.c @@ -154,9 +154,9 @@ static void indicator_class_init (IndicatorPluginClass *klass) { XfcePanelPluginClass *plugin_class; - GObjectClass *gobject_class; + //GObjectClass *gobject_class; - gobject_class = G_OBJECT_CLASS (klass); + //gobject_class = G_OBJECT_CLASS (klass); //gobject_class->get_property = indicator_get_property; //gobject_class->set_property = indicator_set_property; @@ -196,7 +196,7 @@ indicator_init (IndicatorPlugin *indicator) static void indicator_free (XfcePanelPlugin *plugin) { - IndicatorPlugin *indicator = XFCE_INDICATOR_PLUGIN (plugin); + //IndicatorPlugin *indicator = XFCE_INDICATOR_PLUGIN (plugin); GtkWidget *dialog; /* check if the dialog is still open. if so, destroy it */ @@ -274,7 +274,6 @@ static void indicator_construct (XfcePanelPlugin *plugin) { IndicatorPlugin *indicator = XFCE_INDICATOR_PLUGIN (plugin); - GtkRcStyle *style; gint indicators_loaded = 0; GtkWidget *label; @@ -304,7 +303,7 @@ indicator_construct (XfcePanelPlugin *plugin) length = (indicator->excluded_modules != NULL) ? g_strv_length (indicator->excluded_modules) : 0; while ((name = g_dir_read_name(dir)) != NULL) { for (i = 0; i < length; ++i) { - if (match = (g_strcmp0 (name, indicator->excluded_modules[i]) == 0)) + if ((match = g_strcmp0 (name, indicator->excluded_modules[i])) == 0) break; } @@ -374,34 +373,40 @@ entry_removed (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user static gboolean load_module (const gchar * name, IndicatorPlugin * indicator) { - g_debug("Looking at Module: %s", name); - g_return_val_if_fail(name != NULL, FALSE); + gchar *fullpath; + IndicatorObject *io; + GList *entries, *entry; + IndicatorObjectEntry *entrydata; - if (!g_str_has_suffix(name,G_MODULE_SUFFIX)) - return FALSE; + g_debug("Looking at Module: %s", name); + g_return_val_if_fail(name != NULL, FALSE); - g_debug("Loading Module: %s", name); + if (!g_str_has_suffix(name,G_MODULE_SUFFIX)) + return FALSE; - gchar * fullpath = g_build_filename(INDICATOR_DIR, name, NULL); - IndicatorObject * io = indicator_object_new_from_file(fullpath); - g_free(fullpath); + g_debug("Loading Module: %s", name); - g_signal_connect(G_OBJECT(io), INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED, - G_CALLBACK(entry_added), indicator); - g_signal_connect(G_OBJECT(io), INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED, - G_CALLBACK(entry_removed), indicator->buttonbox); + fullpath = g_build_filename(INDICATOR_DIR, name, NULL); + io = indicator_object_new_from_file(fullpath); + g_free(fullpath); - GList * entries = indicator_object_get_entries(io); - GList * entry = NULL; + g_signal_connect(G_OBJECT(io), INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED, + G_CALLBACK(entry_added), indicator); + g_signal_connect(G_OBJECT(io), INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED, + G_CALLBACK(entry_removed), indicator->buttonbox); - for (entry = entries; entry != NULL; entry = g_list_next(entry)) { - IndicatorObjectEntry * entrydata = (IndicatorObjectEntry *)entry->data; - entry_added(io, entrydata, indicator); - } + entries = indicator_object_get_entries(io); + entry = NULL; - g_list_free(entries); + for (entry = entries; entry != NULL; entry = g_list_next(entry)) + { + entrydata = (IndicatorObjectEntry *)entry->data; + entry_added(io, entrydata, indicator); + } - return TRUE; + g_list_free(entries); + + return TRUE; } _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits