[gnome-commander] Kill stop_kp() one-liner



commit 57f1b1b50941015b1c4fe361fa69fb1e411ca066
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Fri Jun 10 22:47:10 2011 +0200

    Kill stop_kp() one-liner

 src/dialogs/gnome-cmd-search-dialog.cc |    2 +-
 src/gnome-cmd-file-list.cc             |    2 +-
 src/gnome-cmd-file-selector.cc         |    8 ++++----
 src/utils.h                            |    5 -----
 4 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-search-dialog.cc b/src/dialogs/gnome-cmd-search-dialog.cc
index 6a23919..4a0c911 100755
--- a/src/dialogs/gnome-cmd-search-dialog.cc
+++ b/src/dialogs/gnome-cmd-search-dialog.cc
@@ -778,7 +778,7 @@ gboolean GnomeCmdSearchDialog::Private::on_list_keypressed(GtkWidget *result_lis
     if (GNOME_CMD_FILE_LIST (result_list)->key_pressed(event) ||
         handle_list_keypress (GNOME_CMD_FILE_LIST (result_list), event))
     {
-        stop_kp (GTK_OBJECT (result_list));
+        g_signal_stop_emission_by_name (result_list, "key-press-event");
         return TRUE;
     }
 
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index d93d58f..573aa02 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -2379,7 +2379,7 @@ gboolean GnomeCmdFileList::key_pressed(GdkEventKey *event)
                 set_cursor_busy ();
                 toggle();
                 show_dir_tree_size(get_selected_file());
-                stop_kp (*this);
+                g_signal_stop_emission_by_name (this, "key-press-event");
                 g_signal_emit (this, signals[FILES_CHANGED], 0);
                 set_cursor_default ();
                 return TRUE;
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 1d0f45a..4328f1f 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -576,7 +576,7 @@ static gboolean on_list_key_pressed (GtkCList *clist, GdkEventKey *event, GnomeC
         !gcmd_user_actions.handle_key_event(main_win, fs->file_list(), event))
         return FALSE;
 
-    stop_kp (GTK_OBJECT (clist));
+    g_signal_stop_emission_by_name (clist, "key-press-event");
 
     return TRUE;
 }
@@ -1182,13 +1182,13 @@ gboolean GnomeCmdFileSelector::key_pressed(GdkEventKey *event)
             case GDK_Left:
             case GDK_KP_Left:
                 back();
-                stop_kp (*list);
+                g_signal_stop_emission_by_name (list, "key-press-event");
                 return TRUE;
 
             case GDK_Right:
             case GDK_KP_Right:
                 forward();
-                stop_kp (*list);
+                g_signal_stop_emission_by_name (list, "key-press-event");
                 return TRUE;
         }
     }
@@ -1244,7 +1244,7 @@ gboolean GnomeCmdFileSelector::key_pressed(GdkEventKey *event)
                 f = list->get_selected_file();
                 if (f && f->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
                     do_file_specific_action (list, f);
-                stop_kp (*list);
+                g_signal_stop_emission_by_name (list, "key-press-event");
                 return TRUE;
 
             case GDK_Return:
diff --git a/src/utils.h b/src/utils.h
index 6c39ae2..067a59c 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -187,11 +187,6 @@ inline gchar *quote_if_needed (const gchar *in)
 
 gchar *unquote_if_needed (const gchar *in);
 
-inline void stop_kp (GtkObject *obj)
-{
-    g_signal_stop_emission_by_name (obj, "key-press-event");
-}
-
 GList *string_history_add (GList *in, const gchar *value, guint maxsize);
 
 GtkWidget *create_styled_button (const gchar *text);



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