gnome-commander r1717 - branches/gcmd-1-3/src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1717 - branches/gcmd-1-3/src
- Date: Wed, 23 Apr 2008 17:43:28 +0100 (BST)
Author: epiotr
Date: Wed Apr 23 16:43:27 2008
New Revision: 1717
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1717&view=rev
Log:
Code cleanup
Modified:
branches/gcmd-1-3/src/eggcellrendererkeys.cc
branches/gcmd-1-3/src/gnome-cmd-file-list.cc
Modified: branches/gcmd-1-3/src/eggcellrendererkeys.cc
==============================================================================
--- branches/gcmd-1-3/src/eggcellrendererkeys.cc (original)
+++ branches/gcmd-1-3/src/eggcellrendererkeys.cc Wed Apr 23 16:43:27 2008
@@ -481,7 +481,6 @@
if (accel_key == GDK_ISO_Left_Tab)
accel_key = GDK_Tab;
-
#ifdef HAVE_GTK_2_10
accel_mods = event->state & gtk_accelerator_get_default_mod_mask ();
#else
@@ -498,7 +497,6 @@
accel_mods |= GDK_SHIFT_MASK;
if (accel_mods == 0)
- {
switch (event->keyval)
{
case GDK_Escape:
@@ -510,17 +508,14 @@
default:
break;
}
- }
if (keys->accel_mode == GTK_CELL_RENDERER_ACCEL_MODE_GTK)
- {
if (accel_key != GDK_Tab && !gtk_accelerator_valid (accel_key, (GdkModifierType) accel_mods))
{
// gtk_widget_error_bell (widget); // FIXME: since 2.12, uncomment when dependency is met
return TRUE;
}
- }
edited = TRUE;
@@ -545,16 +540,14 @@
}
-static void ungrab_stuff (GtkWidget *widget, gpointer data)
+static void ungrab_stuff (GtkWidget *widget, EggCellRendererKeys *keys)
{
GdkDisplay *display = gtk_widget_get_display (widget);
gdk_display_keyboard_ungrab (display, GDK_CURRENT_TIME);
gdk_display_pointer_ungrab (display, GDK_CURRENT_TIME);
- EggCellRendererKeys *keys = EGG_CELL_RENDERER_KEYS (data);
-
- g_signal_handlers_disconnect_by_func (G_OBJECT (keys->grab_widget), (gpointer) G_CALLBACK (grab_key_callback), data);
+ g_signal_handlers_disconnect_by_func (G_OBJECT (keys->grab_widget), (gpointer) G_CALLBACK (grab_key_callback), keys);
}
Modified: branches/gcmd-1-3/src/gnome-cmd-file-list.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-file-list.cc (original)
+++ branches/gcmd-1-3/src/gnome-cmd-file-list.cc Wed Apr 23 16:43:27 2008
@@ -372,7 +372,6 @@
{
g_return_if_fail (GNOME_CMD_IS_FILE_LIST (fl));
- GList *sel;
const gchar *ext1, *ext2;
GnomeCmdFile *f = gnome_cmd_file_list_get_selected_file (fl);
@@ -380,7 +379,7 @@
ext1 = gnome_cmd_file_get_extension (f);
if (!ext1) return;
- sel = g_list_copy (gnome_cmd_file_list_get_selected_files (fl));
+ GList *sel = g_list_copy (gnome_cmd_file_list_get_selected_files (fl));
for (GList *tmp=gnome_cmd_file_list_get_all_files (fl); tmp; tmp = tmp->next)
{
@@ -580,13 +579,7 @@
}
-static void
-drag_data_get (GtkWidget *widget,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint32 time,
- GnomeCmdFileList *fl)
+static void drag_data_get (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint32 time, GnomeCmdFileList *fl)
{
int len;
GList *files;
@@ -931,11 +924,7 @@
}
-static void
-on_scroll_vertical (GtkCList *clist,
- GtkScrollType scroll_type,
- gfloat position,
- GnomeCmdFileList *fl)
+static void on_scroll_vertical (GtkCList *clist, GtkScrollType scroll_type, gfloat position, GnomeCmdFileList *fl)
{
g_return_if_fail (GTK_IS_CLIST (clist));
g_return_if_fail (GNOME_CMD_IS_FILE_LIST (fl));
@@ -1023,10 +1012,7 @@
}
-static void
-on_file_clicked (GnomeCmdFileList *fl,
- GnomeCmdFile *finfo, GdkEventButton *event,
- gpointer data)
+static void on_file_clicked (GnomeCmdFileList *fl, GnomeCmdFile *finfo, GdkEventButton *event, gpointer data)
{
g_return_if_fail (GNOME_CMD_IS_FILE_LIST (fl));
g_return_if_fail (finfo != NULL);
@@ -1090,10 +1076,7 @@
}
-static void
-on_motion_notify (GtkCList *clist,
- GdkEventMotion *event,
- GnomeCmdFileList *fl)
+static void on_motion_notify (GtkCList *clist, GdkEventMotion *event, GnomeCmdFileList *fl)
{
g_return_if_fail (event != NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]