[gtranslator] Fix warnings spotted with new gcc
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator] Fix warnings spotted with new gcc
- Date: Mon, 28 Mar 2011 19:08:26 +0000 (UTC)
commit 365c1c90edaeeb31466d774eda83a96167f9a8f3
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Mon Mar 28 21:08:15 2011 +0200
Fix warnings spotted with new gcc
plugins/codeview/gtr-codeview-plugin.c | 6 ------
plugins/codeview/gtr-viewer.c | 4 ++--
src/dialogs/gtr-header-dialog.c | 2 --
src/gtr-actions-file.c | 3 +--
src/gtr-actions-search.c | 2 --
src/gtr-notebook.c | 3 ---
src/gtr-view.c | 8 +-------
src/gtr-window.c | 2 --
src/main.c | 2 +-
src/toolbareditor/hand-open.png | Bin 1088 -> 0 bytes
10 files changed, 5 insertions(+), 27 deletions(-)
---
diff --git a/plugins/codeview/gtr-codeview-plugin.c b/plugins/codeview/gtr-codeview-plugin.c
index bc5b55f..42e626c 100644
--- a/plugins/codeview/gtr-codeview-plugin.c
+++ b/plugins/codeview/gtr-codeview-plugin.c
@@ -479,7 +479,6 @@ showed_message_cb (GtrTab * tab,
GtkTextBuffer *buffer;
GtkTextView *view;
GtrContextPanel *panel;
- GtkTextMark *path_start, *path_end;
GtkTextTag *bold;
panel = gtr_tab_get_context_panel (tab);
@@ -493,9 +492,6 @@ showed_message_cb (GtrTab * tab,
bold = gtk_text_buffer_create_tag (buffer, NULL, "weight", PANGO_WEIGHT_BOLD,
"weight-set", TRUE, NULL);
- path_start = gtk_text_buffer_create_mark (buffer,
- "path_start", &iter, TRUE);
-
gtk_text_buffer_insert (buffer, &iter, "\n", 1);
gtk_text_buffer_insert_with_tags (buffer, &iter, _("Paths:"), -1, bold, NULL);
gtk_text_buffer_insert (buffer, &iter, "\n", 1);
@@ -515,8 +511,6 @@ showed_message_cb (GtrTab * tab,
*/
g_object_set_data (G_OBJECT (buffer), "link_tags", plugin->priv->tags);
plugin->priv->tags = NULL;
-
- path_end = gtk_text_buffer_create_mark (buffer, "path_end", &iter, TRUE);
}
static void
diff --git a/plugins/codeview/gtr-viewer.c b/plugins/codeview/gtr-viewer.c
index a469575..71cf151 100644
--- a/plugins/codeview/gtr-viewer.c
+++ b/plugins/codeview/gtr-viewer.c
@@ -179,7 +179,7 @@ gtk_source_buffer_load_file (GtkSourceBuffer * source_buffer,
gchar *buffer;
GError *error_here = NULL;
- g_return_val_if_fail (GTK_IS_SOURCE_BUFFER (source_buffer), FALSE);
+ g_return_val_if_fail (GTK_SOURCE_IS_BUFFER (source_buffer), FALSE);
g_return_val_if_fail (filename != NULL, FALSE);
if (!g_file_get_contents (filename, &buffer, NULL, &error_here))
@@ -245,7 +245,7 @@ get_language_for_filename (const gchar * filename)
gchar **globs, **p;
lang = gtk_source_language_manager_get_language (manager, *languages);
- g_return_val_if_fail (GTK_IS_SOURCE_LANGUAGE (lang), NULL);
+ g_return_val_if_fail (GTK_SOURCE_IS_LANGUAGE (lang), NULL);
++languages;
globs = gtk_source_language_get_globs (lang);
diff --git a/src/dialogs/gtr-header-dialog.c b/src/dialogs/gtr-header-dialog.c
index 7800b37..6d2a5d2 100644
--- a/src/dialogs/gtr-header-dialog.c
+++ b/src/dialogs/gtr-header-dialog.c
@@ -371,12 +371,10 @@ void
gtr_show_header_dialog (GtrWindow * window)
{
static GtrHeaderDialog *dlg = NULL;
- GtrPo *po;
GtrTab *tab;
tab = gtr_window_get_active_tab (window);
g_return_if_fail (tab != NULL);
- po = gtr_tab_get_po (tab);
g_return_if_fail (GTR_IS_WINDOW (window));
diff --git a/src/gtr-actions-file.c b/src/gtr-actions-file.c
index 6725c9f..fdbab3a 100644
--- a/src/gtr-actions-file.c
+++ b/src/gtr-actions-file.c
@@ -306,7 +306,6 @@ gtr_save_file_as_dialog (GtkAction * action, GtrWindow * window)
GtrPo *po;
GFile *location;
gchar *uri = NULL;
- gboolean uri_set = FALSE;
if (dialog != NULL)
{
@@ -338,7 +337,7 @@ gtr_save_file_as_dialog (GtkAction * action, GtrWindow * window)
g_object_unref (location);
if (uri)
- uri_set = gtk_file_chooser_set_uri (GTK_FILE_CHOOSER (dialog), uri);
+ gtk_file_chooser_set_uri (GTK_FILE_CHOOSER (dialog), uri);
g_free (uri);
diff --git a/src/gtr-actions-search.c b/src/gtr-actions-search.c
index 4186e56..117a0f3 100644
--- a/src/gtr-actions-search.c
+++ b/src/gtr-actions-search.c
@@ -427,7 +427,6 @@ do_replace (GtrSearchDialog * dialog, GtrWindow * window)
gchar *unescaped_replace_text;
gchar *selected_text = NULL;
gboolean match_case;
- gboolean search_backwards;
view = gtr_window_get_active_view (window);
if (view == NULL)
@@ -446,7 +445,6 @@ do_replace (GtrSearchDialog * dialog, GtrWindow * window)
gtr_view_get_selected_text (view, &selected_text, NULL);
match_case = gtr_search_dialog_get_match_case (dialog);
- search_backwards = gtr_search_dialog_get_backwards (dialog);
if ((selected_text == NULL) ||
(match_case && (strcmp (selected_text, unescaped_search_text) != 0)) ||
diff --git a/src/gtr-notebook.c b/src/gtr-notebook.c
index cbec70b..452c419 100644
--- a/src/gtr-notebook.c
+++ b/src/gtr-notebook.c
@@ -148,14 +148,11 @@ gtr_notebook_new ()
void
gtr_notebook_add_page (GtrNotebook * notebook, GtrTab * tab)
{
- GtrPo *po;
GtkWidget *label;
g_return_if_fail (GTR_IS_NOTEBOOK (notebook));
g_return_if_fail (GTR_IS_TAB (tab));
- po = gtr_tab_get_po (tab);
-
label = create_tab_label (notebook, tab);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), GTK_WIDGET (tab), label);
diff --git a/src/gtr-view.c b/src/gtr-view.c
index 8a55c12..df4cc3a 100644
--- a/src/gtr-view.c
+++ b/src/gtr-view.c
@@ -51,7 +51,7 @@
GTR_TYPE_VIEW, \
GtrViewPrivate))
-G_DEFINE_TYPE (GtrView, gtr_view, GTK_TYPE_SOURCE_VIEW)
+G_DEFINE_TYPE (GtrView, gtr_view, GTK_SOURCE_TYPE_VIEW)
struct _GtrViewPrivate
{
@@ -433,29 +433,23 @@ gtr_view_set_font (GtrView * view, gboolean def, const gchar * font_name)
void
gtr_view_set_search_text (GtrView * view, const gchar * text, guint flags)
{
- GtkSourceBuffer *doc;
gchar *converted_text;
- gboolean notify = FALSE;
- //gboolean update_to_search_region = FALSE;
g_return_if_fail (GTR_IS_VIEW (view));
g_return_if_fail ((text == NULL) || (view->priv->search_text != text));
g_return_if_fail ((text == NULL) || g_utf8_validate (text, -1, NULL));
//gedit_debug_message (DEBUG_DOCUMENT, "text = %s", text);
- doc = GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
if (text != NULL)
{
if (*text != '\0')
{
converted_text = gtr_utils_unescape_search_text (text);
- notify = !gtr_view_get_can_search_again (view);
}
else
{
converted_text = g_strdup ("");
- notify = gtr_view_get_can_search_again (view);
}
g_free (view->priv->search_text);
diff --git a/src/gtr-window.c b/src/gtr-window.c
index 4583d64..c0dcb27 100644
--- a/src/gtr-window.c
+++ b/src/gtr-window.c
@@ -606,7 +606,6 @@ set_sensitive_according_to_tab (GtrWindow * window, GtrTab * tab)
GtrPo *po;
GtkSourceBuffer *buf;
GtkAction *action;
- GList *current;
GtrPoState state;
gint pages;
gint current_page;
@@ -615,7 +614,6 @@ set_sensitive_according_to_tab (GtrWindow * window, GtrTab * tab)
pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (window->priv->notebook));
view = gtr_tab_get_active_view (tab);
po = gtr_tab_get_po (tab);
- current = gtr_po_get_current_message (po);
buf = GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
if (gtk_action_group_get_sensitive (window->priv->action_group) == FALSE)
diff --git a/src/main.c b/src/main.c
index 7fbcc25..7112fcc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -98,5 +98,5 @@ main (gint argc, gchar * argv[])
g_object_unref (app);
gtr_dirs_shutdown ();
- return 0;
+ return status;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]