[gtranslator] Fix several warnings.



commit 86eb2fb7ef6c504b42203f7137fb19f773b29f7a
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Sun Feb 7 21:56:43 2010 +0100

    Fix several warnings.

 src/gtr-actions-file.c      |    2 +-
 src/gtr-header.h            |    2 ++
 src/gtr-message-table.c     |   21 ++++++++++-----------
 src/gtr-notebook.c          |    1 -
 src/gtr-po.c                |    1 -
 src/gtr-po.h                |    4 ++++
 src/gtr-prefs-manager-app.h |    4 ++++
 src/gtr-tab.c               |   11 ++++-------
 src/gtr-tab.h               |    2 ++
 src/gtr-view.c              |    1 -
 src/gtr-view.h              |   18 ++++++++++++++++++
 src/gtr-window.c            |   25 +++++--------------------
 src/gtr-window.h            |    3 +++
 src/main.c                  |    1 -
 14 files changed, 53 insertions(+), 43 deletions(-)
---
diff --git a/src/gtr-actions-file.c b/src/gtr-actions-file.c
index eea6209..cff23a2 100644
--- a/src/gtr-actions-file.c
+++ b/src/gtr-actions-file.c
@@ -81,7 +81,7 @@ gtr_open (GFile * location,
   /*
    * If not a crash/temporary file, add to the history.
    */
-  gtr_recent_add (window, location, project_id);
+  _gtr_recent_add (window, location, project_id);
 
   /*
    * Create a page to add to our list of open files
diff --git a/src/gtr-header.h b/src/gtr-header.h
index d1c651e..9e14d9d 100644
--- a/src/gtr-header.h
+++ b/src/gtr-header.h
@@ -125,4 +125,6 @@ void                  gtr_header_set_plural_forms    (GtrHeader * header,
                                                               const gchar * plural_forms);
 gint                  gtr_header_get_nplurals        (GtrHeader * header);
 
+void gtr_header_update_header (GtrHeader *header);
+
 #endif /* __HEADER_H__ */
diff --git a/src/gtr-message-table.c b/src/gtr-message-table.c
index 39f62c4..6650e3c 100644
--- a/src/gtr-message-table.c
+++ b/src/gtr-message-table.c
@@ -52,8 +52,8 @@ G_DEFINE_TYPE (GtrMessageTable, gtr_message_table,
        GtrTab *tab;
      };
 
-     static void
-       gtr_message_table_selection_changed (GtkTreeSelection *
+static void
+gtr_message_table_selection_changed (GtkTreeSelection *
 						    selection,
 						    GtrMessageTable *
 						    table)
@@ -88,10 +88,9 @@ static void
 showed_message_cb (GtrTab * tab,
 		   GtrMsg * msg, GtrMessageTable * table)
 {
-  GtkTreeModel *model, *sort_model;
-  GtkTreePath *path, *sort_path;
+  GtkTreePath *path;
   GtkTreeSelection *selection;
-  GtkTreeIter iter, sort_iter;
+  GtkTreeIter iter;
 
   selection =
     gtk_tree_view_get_selection (GTK_TREE_VIEW (table->priv->treeview));
@@ -128,7 +127,7 @@ message_changed_cb (GtrTab * tab,
   gtr_message_table_model_update_row (table->priv->store, path);
 }
 
-gint
+static gint
 compare_by_status (gint a_status, gint b_status, gint a_pos, gint b_pos)
 {
   if (a_status == b_status)
@@ -137,7 +136,7 @@ compare_by_status (gint a_status, gint b_status, gint a_pos, gint b_pos)
     return a_status - b_status;
 }
 
-gint
+static gint
 model_compare_by_status (GtkTreeModel * model,
 			 GtkTreeIter * a, GtkTreeIter * b, gpointer user_data)
 {
@@ -155,7 +154,7 @@ model_compare_by_status (GtkTreeModel * model,
   return compare_by_status (a_status, b_status, a_pos, b_pos);
 }
 
-gint
+static gint
 list_compare_by_status (gconstpointer a, gconstpointer b)
 {
   gint a_status, b_status, a_pos, b_pos;
@@ -169,7 +168,7 @@ list_compare_by_status (gconstpointer a, gconstpointer b)
   return compare_by_status (a_status, b_status, a_pos, b_pos);
 }
 
-gint
+static gint
 list_compare_by_position (gconstpointer a, gconstpointer b)
 {
   gint a_pos, b_pos;
@@ -179,7 +178,7 @@ list_compare_by_position (gconstpointer a, gconstpointer b)
   return a_pos - b_pos;
 }
 
-gint
+static gint
 list_compare_by_original (gconstpointer a, gconstpointer b)
 {
   const gchar *a_original, *b_original;
@@ -190,7 +189,7 @@ list_compare_by_original (gconstpointer a, gconstpointer b)
   return g_utf8_collate (a_original, b_original);
 }
 
-gint
+static gint
 list_compare_by_translation (gconstpointer a, gconstpointer b)
 {
   const gchar *a_translated, *b_translated;
diff --git a/src/gtr-notebook.c b/src/gtr-notebook.c
index 4df3abd..1dccbda 100644
--- a/src/gtr-notebook.c
+++ b/src/gtr-notebook.c
@@ -113,7 +113,6 @@ build_tab_label (GtrNotebook * nb, GtrTab * tab)
   GtkWidget *close_button;
   GtkRcStyle *rcstyle;
   GtkWidget *image;
-  GtkWidget *spinner;
   GtkWidget *icon;
 
   hbox = gtk_hbox_new (FALSE, 4);
diff --git a/src/gtr-po.c b/src/gtr-po.c
index 651f88b..9000e29 100644
--- a/src/gtr-po.c
+++ b/src/gtr-po.c
@@ -357,7 +357,6 @@ gtr_po_parse (GtrPo * po, GFile * location, GError ** error)
   po_message_iterator_t iter;
   const gchar *msgstr;
   const gchar *const *domains;
-  gchar *base;
   gint i = 0;
   gint pos = 1;
 
diff --git a/src/gtr-po.h b/src/gtr-po.h
index 09d81c7..2af5367 100644
--- a/src/gtr-po.h
+++ b/src/gtr-po.h
@@ -124,6 +124,10 @@ gtr_po_get_type (void)
 
      GList *gtr_po_get_current_message (GtrPo * po);
 
+void
+gtr_po_update_current_message (GtrPo * po,
+				       GtrMsg * msg);
+
      GList *gtr_po_get_domains (GtrPo * po);
 
      po_file_t gtr_po_get_po_file (GtrPo * po);
diff --git a/src/gtr-prefs-manager-app.h b/src/gtr-prefs-manager-app.h
index 15ff9d8..d3fb71c 100644
--- a/src/gtr-prefs-manager-app.h
+++ b/src/gtr-prefs-manager-app.h
@@ -62,5 +62,9 @@ gint gtr_prefs_manager_get_comment_pane_pos (void);
 gint gtr_prefs_manager_get_default_comment_pane_pos (void);
 void gtr_prefs_manager_set_comment_pane_pos (gint new_pane_pos);
 
+/* Content pane */
+gint gtr_prefs_manager_get_content_pane_pos (void);
+gint gtr_prefs_manager_get_default_content_pane_pos (void);
+void gtr_prefs_manager_set_content_pane_pos (gint new_pane_pos);
 
 #endif /* __GTR_PREFS_MANAGER_APP_H__ */
diff --git a/src/gtr-tab.c b/src/gtr-tab.c
index c7e7cbd..45dc1f3 100644
--- a/src/gtr-tab.c
+++ b/src/gtr-tab.c
@@ -32,6 +32,7 @@
 #include <config.h>
 #endif
 
+#include "dialogs/gtr-comment-dialog.h"
 #include "gtr-application.h"
 #include "gtr-context.h"
 #include "gtr-io-error-info-bar.h"
@@ -40,6 +41,7 @@
 #include "gtr-tab.h"
 #include "gtr-po.h"
 #include "gtr-prefs-manager.h"
+#include "gtr-prefs-manager-app.h"
 #include "gtr-view.h"
 #include "gtr-translation-memory.h"
 #include "gtr-translation-memory-ui.h"
@@ -424,7 +426,7 @@ gtr_tab_show_message (GtrTab * tab, GtrMsg * msg)
   GtrPo *po;
   GtkTextBuffer *buf;
   const gchar *msgid, *msgid_plural;
-  const gchar *msgstr, *msgstr_plural;
+  const gchar *msgstr;
 
   g_return_if_fail (GTR_IS_TAB (tab));
 
@@ -594,15 +596,10 @@ gtr_tab_add_msgstr_tabs (GtrTab * tab)
 static void
 gtr_tab_draw (GtrTab * tab)
 {
-  gint current_page_num;
-  GtkWidget *image;
   GtkWidget *vertical_box;
   GtkWidget *label_widget;
   GtkWidget *msgid_label;
-  GtkWidget *current_page;
-  GtkWidget *notebook, *tm_layout, *tm, *comments_label, *tm_label, *scroll;
-  GtkWidget *hbox;
-  GtkWidget *label;
+  GtkWidget *scroll;
   GtrTabPrivate *priv = tab->priv;
 
   /*
diff --git a/src/gtr-tab.h b/src/gtr-tab.h
index e7e954f..d85e249 100644
--- a/src/gtr-tab.h
+++ b/src/gtr-tab.h
@@ -143,6 +143,8 @@ gtr_tab_get_type (void)
 
      void gtr_tab_clear_msgstr_views (GtrTab * tab);
 
+     void gtr_tab_copy_to_translation (GtrTab * tab);
+
      void gtr_tab_block_movement (GtrTab * tab);
 
      void gtr_tab_unblock_movement (GtrTab * tab);
diff --git a/src/gtr-view.c b/src/gtr-view.c
index fa10b26..263b6c0 100644
--- a/src/gtr-view.c
+++ b/src/gtr-view.c
@@ -97,7 +97,6 @@ gtr_view_init (GtrView * view)
   GPtrArray *dirs;
   gchar **langs;
   const gchar *const *temp;
-  gint i;
   gchar *datadir;
 
   view->priv = GTR_VIEW_GET_PRIVATE (view);
diff --git a/src/gtr-view.h b/src/gtr-view.h
index 30ced3c..7f427fa 100644
--- a/src/gtr-view.h
+++ b/src/gtr-view.h
@@ -104,6 +104,24 @@ gtr_view_get_type (void)
      gchar *gtr_view_get_search_text (GtrView * view,
 					      guint * flags);
 
+     gboolean gtr_view_get_can_search_again (GtrView * view);
+
+     gboolean gtr_view_search_forward (GtrView * view,
+				 const GtkTextIter * start,
+				 const GtkTextIter * end,
+				 GtkTextIter * match_start,
+				 GtkTextIter * match_end);
+
+     gboolean gtr_view_search_backward (GtrView * view,
+				  const GtkTextIter * start,
+				  const GtkTextIter * end,
+				  GtkTextIter * match_start,
+				  GtkTextIter * match_end);
+
+      gint gtr_view_replace_all (GtrView * view,
+			      const gchar * find,
+			      const gchar * replace, guint flags);
+
      void gtr_view_reload_scheme_color (GtrView * view);
 
 
diff --git a/src/gtr-window.c b/src/gtr-window.c
index 096aed6..05e4c05 100644
--- a/src/gtr-window.c
+++ b/src/gtr-window.c
@@ -33,6 +33,7 @@
 #include "gtr-tab.h"
 #include "gtr-plugins-engine.h"
 #include "gtr-po.h"
+#include "gtr-prefs-manager-app.h"
 #include "gtr-statusbar.h"
 #include "gtr-utils.h"
 #include "gtr-window.h"
@@ -715,8 +716,8 @@ gtr_window_update_statusbar_message_count (GtrTab * tab,
 						   GtrWindow * window)
 {
   GtrPo *po;
-  const gchar *status;
   gchar *msg;
+  const gchar *status;
   gchar *status_msg;
   gchar *current;
   gchar *total;
@@ -734,6 +735,7 @@ gtr_window_update_statusbar_message_count (GtrTab * tab,
   translated = gtr_po_get_translated_count (po);
   fuzzy = gtr_po_get_fuzzy_count (po);
   untranslated = gtr_po_get_untranslated_count (po);
+  status = NULL;
 
   switch (gtr_msg_get_status (message))
     {
@@ -808,7 +810,6 @@ get_menu_tip_for_tab (GtrTab * tab)
 {
   GtrPo *doc;
   gchar *uri;
-  gchar *ruri;
   gchar *tip;
   GFile *file;
 
@@ -1226,12 +1227,11 @@ notebook_tab_added (GtkNotebook * notebook,
 }
 
 void
-gtr_recent_add (GtrWindow * window,
+_gtr_recent_add (GtrWindow * window,
 			GFile * location, gchar * project_id)
 {
   GtkRecentData *recent_data;
   gchar *uri;
-  GError *error = NULL;
   gchar *path;
   gchar *display_name;
 
@@ -1263,7 +1263,7 @@ gtr_recent_add (GtrWindow * window,
   g_slice_free (GtkRecentData, recent_data);
 }
 
-void
+static void
 gtr_recent_remove (GtrWindow * window, const gchar * path)
 {
   gchar *uri;
@@ -1294,8 +1294,6 @@ gtr_recent_chooser_item_activated_cb (GtkRecentChooser * chooser,
 					      GtrWindow * window)
 {
   gchar *uri;
-  GError *error = NULL;
-  GtkWidget *dialog;
   GSList *list = NULL;
   GFile *location;
 
@@ -1335,16 +1333,6 @@ create_recent_chooser_menu (GtrWindow * window,
 }
 
 static void
-gtr_window_set_action_sensitive (GtrWindow * window,
-					 const gchar * name,
-					 gboolean sensitive)
-{
-  GtkAction *action = gtk_action_group_get_action (window->priv->action_group,
-						   name);
-  gtk_action_set_sensitive (action, sensitive);
-}
-
-static void
 gtr_window_cmd_edit_toolbar_cb (GtkDialog * dialog,
 					gint response, gpointer data)
 {
@@ -1450,8 +1438,6 @@ gtr_window_draw (GtrWindow * window)
   GtkWidget *widget;
   GError *error = NULL;
   GtkWidget *dockbar;
-  GtkWidget *hbox_dock;
-  GtkWidget *tm_widget;
   GtkActionGroup *action_group;
   gchar *datadir;
   gchar *path;
@@ -1602,7 +1588,6 @@ static void
 gtr_window_init (GtrWindow * window)
 {
   GtkTargetList *tl;
-  gint active_page;
   GtkWidget *view_menu;
   gchar *filename;
   gchar *config_folder;
diff --git a/src/gtr-window.h b/src/gtr-window.h
index d4cf5c2..ec96e52 100644
--- a/src/gtr-window.h
+++ b/src/gtr-window.h
@@ -145,5 +145,8 @@ gtr_window_get_type (void)
 
      GtkWidget *gtr_window_get_tm_menu (GtrWindow * window);
 
+void _gtr_recent_add (GtrWindow * window,
+			GFile * location, gchar * project_id);
+
 G_END_DECLS
 #endif /* __WINDOW_H__ */
diff --git a/src/main.c b/src/main.c
index 2d6d29e..4093b6e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -133,7 +133,6 @@ main (gint argc, gchar * argv[])
   GList *profiles_list = NULL;
   GFile *file;
   gchar *pixmaps_dir;
-  gchar *window_icon;
 
   /*
    * Initialize gettext.



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