[gnome-utils] gdict: Fix compiler warnings from -Wall



commit d554625fa8e7334718506453178945b52cd59992
Author: Benjamin Otte <otte redhat com>
Date:   Wed Sep 1 14:10:51 2010 +0200

    gdict: Fix compiler warnings from -Wall
    
    https://bugzilla.gnome.org/show_bug.cgi?id=628499

 gnome-dictionary/src/gdict-applet.c        |   22 ----------------------
 gnome-dictionary/src/gdict-common.c        |    1 +
 gnome-dictionary/src/gdict-pref-dialog.c   |    1 -
 gnome-dictionary/src/gdict-sidebar.c       |    1 -
 gnome-dictionary/src/gdict-source-dialog.c |   17 +----------------
 gnome-dictionary/src/gdict-window.c        |    9 ---------
 6 files changed, 2 insertions(+), 49 deletions(-)
---
diff --git a/gnome-dictionary/src/gdict-applet.c b/gnome-dictionary/src/gdict-applet.c
index acd7dd7..4fe9637 100644
--- a/gnome-dictionary/src/gdict-applet.c
+++ b/gnome-dictionary/src/gdict-applet.c
@@ -504,7 +504,6 @@ gdict_applet_draw (GdictApplet *applet)
   GdictAppletPrivate *priv = applet->priv;
   GtkWidget *box;
   GtkWidget *hbox;
-  GtkWidget *label;
   gchar *text = NULL;
 
   if (priv->entry)
@@ -709,14 +708,6 @@ gdict_applet_cmd_print (BonoboUIComponent *component,
 }
 
 static void
-gdict_applet_cmd_save (BonoboUIComponent *component,
-		       GdictApplet       *applet,
-		       const gchar       *cname)
-{
-  save_cb (NULL, applet);
-}
-
-static void
 gdict_applet_cmd_preferences (BonoboUIComponent *component,
 			      GdictApplet       *applet,
 			      const gchar       *cname)
@@ -977,18 +968,6 @@ gdict_applet_set_defbox_font (GdictApplet *applet,
 }
 
 static void
-gdict_applet_set_word (GdictApplet *applet,
-		       const gchar *word)
-{
-  GdictAppletPrivate *priv = applet->priv;
-  
-  if (priv->word)
-    g_free (priv->word);
-  
-  priv->word = g_strdup (word);
-}
-
-static void
 gdict_applet_set_context (GdictApplet  *applet,
 			  GdictContext *context)
 {
@@ -1055,7 +1034,6 @@ gdict_applet_gconf_notify_cb (GConfClient *client,
 			      gpointer     user_data)
 {
   GdictApplet *applet = GDICT_APPLET (user_data);
-  GdictAppletPrivate *priv = applet->priv;
 
   if (strcmp (entry->key, GDICT_GCONF_PRINT_FONT_KEY) == 0)
     {
diff --git a/gnome-dictionary/src/gdict-common.c b/gnome-dictionary/src/gdict-common.c
index a644de6..6410a43 100644
--- a/gnome-dictionary/src/gdict-common.c
+++ b/gnome-dictionary/src/gdict-common.c
@@ -33,6 +33,7 @@
 
 #include <glib.h>
 #include <glib/gi18n.h>
+#include <glib/gstdio.h>
 
 #include <gtk/gtk.h>
 
diff --git a/gnome-dictionary/src/gdict-pref-dialog.c b/gnome-dictionary/src/gdict-pref-dialog.c
index 667a8b0..e6a165e 100644
--- a/gnome-dictionary/src/gdict-pref-dialog.c
+++ b/gnome-dictionary/src/gdict-pref-dialog.c
@@ -325,7 +325,6 @@ source_remove_clicked_cb (GtkWidget       *widget,
   GtkTreeModel *model;
   GtkTreeIter iter;
   gboolean is_selected;
-  GdictSource *source;
   gchar *name, *description;
   
   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->sources_view));
diff --git a/gnome-dictionary/src/gdict-sidebar.c b/gnome-dictionary/src/gdict-sidebar.c
index 1e13986..76b65d2 100644
--- a/gnome-dictionary/src/gdict-sidebar.c
+++ b/gnome-dictionary/src/gdict-sidebar.c
@@ -457,7 +457,6 @@ gdict_sidebar_remove_page (GdictSidebar *sidebar,
 {
   GdictSidebarPrivate *priv;
   SidebarPage *page;
-  GtkWidget *menu_item;
   GList *children, *l;
   
   g_return_if_fail (GDICT_IS_SIDEBAR (sidebar));
diff --git a/gnome-dictionary/src/gdict-source-dialog.c b/gnome-dictionary/src/gdict-source-dialog.c
index 12172f2..794bf5a 100644
--- a/gnome-dictionary/src/gdict-source-dialog.c
+++ b/gnome-dictionary/src/gdict-source-dialog.c
@@ -37,6 +37,7 @@
 #include <gconf/gconf-client.h>
 
 #include "gdict-source-dialog.h"
+#include "gdict-common.h"
 
 #define GDICT_SOURCE_UI 	PKGDATADIR "/gnome-dictionary-source.ui"
 
@@ -170,22 +171,6 @@ set_text_to_entry (GdictSourceDialog *dialog,
   gtk_entry_set_text (GTK_ENTRY (entry), text);
 }
 
-static gchar *
-get_text_from_combo (GdictSourceDialog *dialog,
-		     const gchar       *combo_name)
-{
-  GtkWidget *combo;
-  gchar *retval;
-  
-  combo = GTK_WIDGET (gtk_builder_get_object (dialog->builder, combo_name));
-  if (!combo)
-    return NULL;
-  
-  retval = gtk_combo_box_get_active_text (GTK_COMBO_BOX (combo));
-  
-  return retval;
-}
-
 static void
 set_transport_settings (GdictSourceDialog *dialog)
 {
diff --git a/gnome-dictionary/src/gdict-window.c b/gnome-dictionary/src/gdict-window.c
index f79e9d1..8febb9c 100644
--- a/gnome-dictionary/src/gdict-window.c
+++ b/gnome-dictionary/src/gdict-window.c
@@ -210,7 +210,6 @@ static gint n_toggle_state = G_N_ELEMENTS (toggle_state);
 static void
 gdict_window_ensure_menu_state (GdictWindow *window)
 {
-  GtkWidget *item;
   gint i;
   gboolean is_sensitive;
 
@@ -398,8 +397,6 @@ gdict_window_error_cb (GdictContext *context,
 		       const GError *error,
 		       GdictWindow  *window)
 {
-  gint count;
-  
   gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), NULL);
   
   if (window->status && window->statusbar_visible)
@@ -1006,8 +1003,6 @@ static void
 gdict_window_cmd_view_sidebar (GtkAction   *action,
 			       GdictWindow *window)
 {
-  gboolean is_active;
-  
   g_assert (GDICT_IS_WINDOW (window));
 
   if (window->sidebar_visible)
@@ -1553,8 +1548,6 @@ gdict_window_drag_data_received_cb (GtkWidget        *widget,
   text = (gchar *) gtk_selection_data_get_text (data);
   if (text)
     {
-      gchar *title;
-      
       gtk_entry_set_text (GTK_ENTRY (window->entry), text);
 
       gdict_window_set_word (window, text, NULL);
@@ -1658,7 +1651,6 @@ static void
 gdict_window_style_set (GtkWidget *widget,
 			GtkStyle  *old_style)
 {
-  GdictWindow *window;
 
   if (GTK_WIDGET_CLASS (gdict_window_parent_class)->style_set)
     GTK_WIDGET_CLASS (gdict_window_parent_class)->style_set (widget, old_style);
@@ -1698,7 +1690,6 @@ gdict_window_constructor (GType                  type,
   GtkWidget *button;
   GtkActionGroup *action_group;
   GtkAccelGroup *accel_group;
-  GtkAction *action;
   PangoFontDescription *font_desc;
   gchar *font_name, *sidebar_page;
   GError *error;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]