Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Mon, 26 May 2014 14:24:24 UTC Commit: 2b9ecc2e4ff59e9805261a3aa4fe553c93e69531 https://github.com/geany/geany/commit/2b9ecc2e4ff59e9805261a3aa4fe553c93e695...
Log Message: ----------- Remove unused variables and avoid variable shadowing
Modified Paths: -------------- src/document.c
Modified: src/document.c 14 lines changed, 6 insertions(+), 8 deletions(-) =================================================================== @@ -3070,7 +3070,7 @@ static GtkWidget* document_show_message(GeanyDocument *doc, GtkMessageType msgty va_list args; gchar *text, *markup; GtkWidget *hbox, *vbox, *icon, *label, *extra_label, *content_area; - GtkWidget *info_widget, *ok_button, *cancel_button, *parent; + GtkWidget *info_widget, *parent; parent = gtk_notebook_get_nth_page(GTK_NOTEBOOK(main_widgets.notebook), document_get_notebook_page(doc));
@@ -3158,7 +3158,7 @@ static void on_monitor_reload_file_response(GtkWidget *bar, gint response_id, Ge document_reload_file(doc, doc->encoding); }
-static gboolean on_sci_key(GtkWidget *w, GdkEventKey *event, gpointer data) +static gboolean on_sci_key(GtkWidget *widget, GdkEventKey *event, gpointer data) { GtkInfoBar *bar = GTK_INFO_BAR(data);
@@ -3169,9 +3169,9 @@ static gboolean on_sci_key(GtkWidget *w, GdkEventKey *event, gpointer data) case GDK_KEY_Tab: case GDK_KEY_ISO_Left_Tab: { - GtkWidget *w = gtk_info_bar_get_action_area(bar); + GtkWidget *action_area = gtk_info_bar_get_action_area(bar); GtkDirectionType dir = event->keyval == GDK_KEY_Tab ? GTK_DIR_TAB_FORWARD : GTK_DIR_TAB_BACKWARD; - gtk_widget_child_focus(w, dir); + gtk_widget_child_focus(action_area, dir); return TRUE; } case GDK_KEY_Escape: @@ -3247,12 +3247,10 @@ static void on_monitor_resave_missing_file_response(GtkWidget *bar,
static void monitor_resave_missing_file(GeanyDocument *doc) { - GtkWidget *bar; - if (doc->priv->info_bars[MSG_TYPE_RESAVE] == NULL) { - GtkWidget *bar; - bar = doc->priv->info_bars[MSG_TYPE_RELOAD]; + GtkWidget *bar = doc->priv->info_bars[MSG_TYPE_RELOAD]; + if (bar != NULL) /* the "file on disk is newer" warning is now moot */ gtk_info_bar_response(GTK_INFO_BAR(bar), GTK_RESPONSE_CANCEL);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).