gnome-commander r1998 - in trunk/src: . intviewer



Author: epiotr
Date: Mon Aug 25 17:29:14 2008
New Revision: 1998
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1998&view=rev

Log:
Code cleanup

Modified:
   trunk/src/dirlist.cc
   trunk/src/gnome-cmd-advrename-dialog.cc
   trunk/src/gnome-cmd-app.cc
   trunk/src/gnome-cmd-bookmark-dialog.cc
   trunk/src/gnome-cmd-con-smb.cc
   trunk/src/gnome-cmd-dir-indicator.cc
   trunk/src/gnome-cmd-dir.cc
   trunk/src/gnome-cmd-file-collection.cc
   trunk/src/gnome-cmd-file-list.cc
   trunk/src/gnome-cmd-file-list.h
   trunk/src/gnome-cmd-file-popmenu.cc
   trunk/src/gnome-cmd-file-selector.cc
   trunk/src/gnome-cmd-main-menu.cc
   trunk/src/gnome-cmd-main-win.cc
   trunk/src/gnome-cmd-notebook.cc
   trunk/src/gnome-cmd-options-dialog.cc
   trunk/src/gnome-cmd-python-plugin.cc
   trunk/src/gnome-cmd-search-dialog.cc
   trunk/src/gnome-cmd-smb-net.cc
   trunk/src/imageloader.cc
   trunk/src/intviewer/scroll-box.cc
   trunk/src/intviewer/searcher.cc
   trunk/src/intviewer/text-render.cc
   trunk/src/intviewer/viewer-widget.cc
   trunk/src/intviewer/viewer-window.cc
   trunk/src/utils.cc
   trunk/src/utils.h

Modified: trunk/src/dirlist.cc
==============================================================================
--- trunk/src/dirlist.cc	(original)
+++ trunk/src/dirlist.cc	Mon Aug 25 17:29:14 2008
@@ -48,7 +48,7 @@
 
     if (entries_read > 0 && list != NULL)
     {
-        g_list_foreach (list, (GFunc)gnome_vfs_file_info_ref, NULL);
+        g_list_foreach (list, (GFunc) gnome_vfs_file_info_ref, NULL);
         dir->infolist = g_list_concat (dir->infolist, g_list_copy (list));
         dir->list_counter += entries_read;
         DEBUG ('l', "files listed: %d\n", dir->list_counter);
@@ -101,7 +101,7 @@
                                         infoOpts,
                                         FILES_PER_NOTIFICATION,
                                         LIST_PRIORITY,
-                                        (GnomeVFSAsyncDirectoryLoadCallback)on_files_listed,
+                                        (GnomeVFSAsyncDirectoryLoadCallback) on_files_listed,
                                         dir);
 
     g_timeout_add (gnome_cmd_data_get_gui_update_rate (), (GSourceFunc) update_list_progress, dir);

Modified: trunk/src/gnome-cmd-advrename-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-advrename-dialog.cc	(original)
+++ trunk/src/gnome-cmd-advrename-dialog.cc	Mon Aug 25 17:29:14 2008
@@ -998,9 +998,8 @@
     };
     gchar *s;
 
-    GtkWidget *dlg = gnome_cmd_string_dialog_new (
-        _("Template Options"), labels, 3,
-        (GnomeCmdStringDialogCallback)on_template_options_ok, dialog);
+    GtkWidget *dlg = gnome_cmd_string_dialog_new (_("Template Options"), labels, 3,
+                                                  (GnomeCmdStringDialogCallback) on_template_options_ok, dialog);
     gtk_widget_ref (dlg);
 
     GtkWidget *check = create_check (GTK_WIDGET (dlg), _("Auto-update when the template is entered"), "auto-update-check");

Modified: trunk/src/gnome-cmd-app.cc
==============================================================================
--- trunk/src/gnome-cmd-app.cc	(original)
+++ trunk/src/gnome-cmd-app.cc	Mon Aug 25 17:29:14 2008
@@ -202,7 +202,7 @@
     app->priv->pattern_string = g_strdup (pattern_string);
 
     // Free old list with patterns
-    g_list_foreach (app->priv->pattern_list, (GFunc)g_free, NULL);
+    g_list_foreach (app->priv->pattern_list, (GFunc) g_free, NULL);
     g_list_free (app->priv->pattern_list);
     app->priv->pattern_list = NULL;
 

Modified: trunk/src/gnome-cmd-bookmark-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-bookmark-dialog.cc	(original)
+++ trunk/src/gnome-cmd-bookmark-dialog.cc	Mon Aug 25 17:29:14 2008
@@ -72,7 +72,7 @@
         _("Bookmark target:"),
     };
 
-    GtkWidget *dlg = gnome_cmd_string_dialog_new (title, labels, 2, (GnomeCmdStringDialogCallback)on_ok, dialog);
+    GtkWidget *dlg = gnome_cmd_string_dialog_new (title, labels, 2, (GnomeCmdStringDialogCallback) on_ok, dialog);
 
     gnome_cmd_string_dialog_set_value (GNOME_CMD_STRING_DIALOG (dlg), 0, name);
     gnome_cmd_string_dialog_set_value (GNOME_CMD_STRING_DIALOG (dlg), 1, path);
@@ -180,7 +180,7 @@
     show_bookmark_dialog (dialog->priv->sel_bookmark->name,
                           dialog->priv->sel_bookmark->path,
                           _("Edit Bookmark"),
-                          (GnomeCmdStringDialogCallback)on_edit_ok,
+                          (GnomeCmdStringDialogCallback) on_edit_ok,
                           dialog);
 }
 
@@ -585,7 +585,7 @@
     show_bookmark_dialog (g_basename (path),
                           path,
                           _("New Bookmark"),
-                          (GnomeCmdStringDialogCallback)on_new_bookmark_ok,
+                          (GnomeCmdStringDialogCallback) on_new_bookmark_ok,
                           NULL);
     g_free (path);
 }

Modified: trunk/src/gnome-cmd-con-smb.cc
==============================================================================
--- trunk/src/gnome-cmd-con-smb.cc	(original)
+++ trunk/src/gnome-cmd-con-smb.cc	Mon Aug 25 17:29:14 2008
@@ -114,7 +114,7 @@
         uri_list,
         infoOpts,
         0,
-        (GnomeVFSAsyncGetFileInfoCallback)get_file_info_callback,
+        (GnomeVFSAsyncGetFileInfoCallback) get_file_info_callback,
         con);
 }
 

Modified: trunk/src/gnome-cmd-dir-indicator.cc
==============================================================================
--- trunk/src/gnome-cmd-dir-indicator.cc	(original)
+++ trunk/src/gnome-cmd-dir-indicator.cc	Mon Aug 25 17:29:14 2008
@@ -343,7 +343,7 @@
                        path);
     }
 
-    gnome_popup_menu_do_popup (indicator->priv->dir_history_popup, (GtkMenuPositionFunc)get_popup_pos, indicator, NULL, NULL, NULL);
+    gnome_popup_menu_do_popup (indicator->priv->dir_history_popup, (GtkMenuPositionFunc) get_popup_pos, indicator, NULL, NULL, NULL);
 
     gint w = -1;
 
@@ -402,7 +402,7 @@
     add_menu_item (indicator, GTK_MENU_SHELL (indicator->priv->bookmark_popup), _("Add current dir"), GTK_SIGNAL_FUNC (on_bookmarks_add_current), indicator);
     add_menu_item (indicator, GTK_MENU_SHELL (indicator->priv->bookmark_popup), _("Manage bookmarks..."), GTK_SIGNAL_FUNC (on_bookmarks_manage), indicator);
 
-    gnome_popup_menu_do_popup (indicator->priv->bookmark_popup, (GtkMenuPositionFunc)get_popup_pos, indicator, NULL, NULL, NULL);
+    gnome_popup_menu_do_popup (indicator->priv->bookmark_popup, (GtkMenuPositionFunc) get_popup_pos, indicator, NULL, NULL, NULL);
 
     gint w = -1;
 

Modified: trunk/src/gnome-cmd-dir.cc
==============================================================================
--- trunk/src/gnome-cmd-dir.cc	(original)
+++ trunk/src/gnome-cmd-dir.cc	Mon Aug 25 17:29:14 2008
@@ -841,7 +841,7 @@
             &dir->priv->monitor_handle,
             uri_str,
             GNOME_VFS_MONITOR_DIRECTORY,
-            (GnomeVFSMonitorCallback)monitor_callback,
+            (GnomeVFSMonitorCallback) monitor_callback,
             dir);
 
         if (result == GNOME_VFS_OK)

Modified: trunk/src/gnome-cmd-file-collection.cc
==============================================================================
--- trunk/src/gnome-cmd-file-collection.cc	(original)
+++ trunk/src/gnome-cmd-file-collection.cc	Mon Aug 25 17:29:14 2008
@@ -63,7 +63,7 @@
 static void init (GnomeCmdFileCollection *collection)
 {
     collection->priv = g_new0 (GnomeCmdFileCollectionPrivate, 1);
-    collection->priv->map = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify)gnome_cmd_file_unref);
+    collection->priv->map = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) gnome_cmd_file_unref);
     collection->priv->list = NULL;
 }
 
@@ -172,7 +172,7 @@
     g_list_free (collection->priv->list);
     collection->priv->list = NULL;
     g_hash_table_destroy (collection->priv->map);
-    collection->priv->map = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify)gnome_cmd_file_unref);
+    collection->priv->map = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) gnome_cmd_file_unref);
 }
 
 

Modified: trunk/src/gnome-cmd-file-list.cc
==============================================================================
--- trunk/src/gnome-cmd-file-list.cc	(original)
+++ trunk/src/gnome-cmd-file-list.cc	Mon Aug 25 17:29:14 2008
@@ -216,14 +216,6 @@
 }
 
 
-inline int get_num_files (GnomeCmdFileList *fl)
-{
-    g_return_val_if_fail (GNOME_CMD_IS_FILE_LIST (fl), -1);
-
-    return g_list_length (gnome_cmd_file_list_get_all_files (fl));
-}
-
-
 inline GnomeCmdFile *get_file_at_row (GnomeCmdFileList *fl, gint row)
 {
     g_return_val_if_fail (GNOME_CMD_IS_FILE_LIST (fl), NULL);
@@ -491,12 +483,11 @@
 
     Filter filter(pattern, case_sens, gnome_cmd_data_get_filter_type ());
 
-    for (GList *tmp=gnome_cmd_file_list_get_all_files (fl); tmp; tmp = tmp->next)
+    for (GList *tmp=gnome_cmd_file_list_get_all_files (fl); tmp; tmp=tmp->next)
     {
         GnomeCmdFile *finfo = (GnomeCmdFile *) tmp->data;
 
         if (finfo && finfo->info)
-        {
             if (filter.match(finfo->info->name))
             {
                 if (mode)
@@ -504,7 +495,6 @@
                 else
                     unselect_file (fl, finfo);
             }
-        }
     }
 }
 
@@ -633,7 +623,7 @@
             tmp = tmp->next;
         }
 
-        g_list_foreach (uri_str_list, (GFunc)g_free, NULL);
+        g_list_foreach (uri_str_list, (GFunc) g_free, NULL);
         g_list_free (uri_str_list);
 
         data [total_len] = '\0';
@@ -676,7 +666,7 @@
             files = gnome_vfs_uri_list_parse (data);
             if (files)
                 gtk_selection_data_set (selection_data, selection_data->target, 8, (const guchar *) files->data, strlen ((const char *) files->data));
-            g_list_foreach (files, (GFunc)g_free, NULL);
+            g_list_foreach (files, (GFunc) g_free, NULL);
             break;
 
         default:
@@ -716,7 +706,7 @@
     if (!menu) return;
 
     gtk_widget_ref (menu);
-    gtk_object_set_data_full (GTK_OBJECT (fl), "file_popup_menu", menu, (GtkDestroyNotify)gtk_widget_unref);
+    gtk_object_set_data_full (GTK_OBJECT (fl), "file_popup_menu", menu, (GtkDestroyNotify) gtk_widget_unref);
 
     gnome_popup_menu_do_popup (menu, (GtkMenuPositionFunc) popup_position_function, fl, event, fl, NULL);
 }
@@ -1342,7 +1332,7 @@
  * Public functions
  ***********************************/
 
-GtkType gnome_cmd_file_list_get_type (void)
+GtkType gnome_cmd_file_list_get_type ()
 {
     static GtkType type = 0;
 
@@ -2198,7 +2188,7 @@
         if ((event->keyval >= GDK_a && event->keyval <= GDK_z)
             || (event->keyval >= GDK_A && event->keyval <= GDK_Z)
             || event->keyval == GDK_period)
-            gnome_cmd_file_list_show_quicksearch (this, (gchar)event->keyval);
+            gnome_cmd_file_list_show_quicksearch (this, (gchar) event->keyval);
     }
     else if (state_is_shift (event->state))
     {

Modified: trunk/src/gnome-cmd-file-list.h
==============================================================================
--- trunk/src/gnome-cmd-file-list.h	(original)
+++ trunk/src/gnome-cmd-file-list.h	Mon Aug 25 17:29:14 2008
@@ -111,8 +111,8 @@
 extern GtkTargetEntry drop_types[];
 
 
-GtkType gnome_cmd_file_list_get_type (void);
-GtkWidget *gnome_cmd_file_list_new (void);
+GtkType gnome_cmd_file_list_get_type ();
+GtkWidget *gnome_cmd_file_list_new ();
 
 inline void GnomeCmdFileList::remove_files (GList *files)
 {

Modified: trunk/src/gnome-cmd-file-popmenu.cc
==============================================================================
--- trunk/src/gnome-cmd-file-popmenu.cc	(original)
+++ trunk/src/gnome-cmd-file-popmenu.cc	Mon Aug 25 17:29:14 2008
@@ -157,7 +157,7 @@
     GtkWidget *term_check = create_check (dialog, _("Needs terminal"), "term_check");
 
     gtk_widget_ref (dialog);
-    gtk_object_set_data_full (GTK_OBJECT (menu_item), "new_textfile_dialog", dialog, (GtkDestroyNotify)gtk_widget_unref);
+    gtk_object_set_data_full (GTK_OBJECT (menu_item), "new_textfile_dialog", dialog, (GtkDestroyNotify) gtk_widget_unref);
 
     gnome_cmd_dialog_add_category (GNOME_CMD_DIALOG (dialog), term_check);
 
@@ -326,7 +326,7 @@
 {
     GnomeCmdFilePopmenu *menu = GNOME_CMD_FILE_POPMENU (object);
 
-    g_list_foreach (menu->priv->data_list, (GFunc)g_free, NULL);
+    g_list_foreach (menu->priv->data_list, (GFunc) g_free, NULL);
     g_list_free (menu->priv->data_list);
 
     g_free (menu->priv);

Modified: trunk/src/gnome-cmd-file-selector.cc
==============================================================================
--- trunk/src/gnome-cmd-file-selector.cc	(original)
+++ trunk/src/gnome-cmd-file-selector.cc	Mon Aug 25 17:29:14 2008
@@ -425,7 +425,7 @@
 {
     g_return_if_fail (list != NULL);
 
-    g_list_foreach (list, (GFunc)gnome_vfs_uri_unref, NULL);
+    g_list_foreach (list, (GFunc) gnome_vfs_uri_unref, NULL);
 }
 
 
@@ -981,7 +981,7 @@
 
         btn = create_styled_button (NULL);
         gtk_object_set_data (GTK_OBJECT (btn), "con", con);
-        gtk_signal_connect (GTK_OBJECT (btn), "clicked", (GtkSignalFunc)on_con_btn_clicked, fs);
+        gtk_signal_connect (GTK_OBJECT (btn), "clicked", (GtkSignalFunc) on_con_btn_clicked, fs);
         gtk_box_pack_start (GTK_BOX (fs->con_btns_hbox), btn, FALSE, FALSE, 0);
         GTK_WIDGET_UNSET_FLAGS (btn, GTK_CAN_FOCUS);
         fs->priv->old_btns = g_list_append (fs->priv->old_btns, btn);
@@ -1177,7 +1177,7 @@
         fs->priv->lwd = NULL;
     }
     else
-        g_timeout_add (1, (GtkFunction)set_home_connection, fs);
+        g_timeout_add (1, (GtkFunction) set_home_connection, fs);
 }
 
 
@@ -1213,7 +1213,7 @@
             static gchar text[2];
 
             if (!gnome_cmd_data_get_cmdline_visibility ())
-                gnome_cmd_file_list_show_quicksearch (fs->file_list(), (gchar)event->keyval);
+                gnome_cmd_file_list_show_quicksearch (fs->file_list(), (gchar) event->keyval);
             else
             {
                 text[0] = event->keyval;
@@ -1923,7 +1923,7 @@
     GtkWidget *dialog;
 
     dialog = gnome_cmd_string_dialog_new (_("New Text File"), labels, 1,
-                                          (GnomeCmdStringDialogCallback)on_new_textfile_ok, fs);
+                                          (GnomeCmdStringDialogCallback) on_new_textfile_ok, fs);
     g_return_if_fail (GNOME_CMD_IS_DIALOG (dialog));
 
     gtk_widget_ref (dialog);
@@ -2085,7 +2085,7 @@
     GtkWidget *dialog = gnome_cmd_string_dialog_new (_("Create Symbolic Link"),
                                                      labels,
                                                      1,
-                                                     (GnomeCmdStringDialogCallback)on_create_symlink_ok,
+                                                     (GnomeCmdStringDialogCallback) on_create_symlink_ok,
                                                      fs);
 
     gnome_cmd_string_dialog_set_value (GNOME_CMD_STRING_DIALOG (dialog), 0, text);

Modified: trunk/src/gnome-cmd-main-menu.cc
==============================================================================
--- trunk/src/gnome-cmd-main-menu.cc	(original)
+++ trunk/src/gnome-cmd-main-menu.cc	Mon Aug 25 17:29:14 2008
@@ -379,7 +379,7 @@
         bm = IMAGE_get_mask (PIXMAP_SWITCH_H);
     }
 
-    g_list_foreach (main_menu->priv->view_menuitems, (GFunc)gtk_object_destroy, NULL);
+    g_list_foreach (main_menu->priv->view_menuitems, (GFunc) gtk_object_destroy, NULL);
     g_list_free (main_menu->priv->view_menuitems);
     main_menu->priv->view_menuitems = NULL;
 
@@ -914,7 +914,7 @@
     GList *dev_cons = gnome_cmd_con_list_get_all_dev (con_list);
 
     // Remove all old items
-    g_list_foreach (main_menu->priv->connections_menuitems, (GFunc)gtk_widget_destroy, NULL);
+    g_list_foreach (main_menu->priv->connections_menuitems, (GFunc) gtk_widget_destroy, NULL);
     g_list_free (main_menu->priv->connections_menuitems);
     main_menu->priv->connections_menuitems = NULL;
 
@@ -961,12 +961,12 @@
     g_return_if_fail (GNOME_CMD_IS_MAIN_MENU (main_menu));
 
     // Remove all old bookmark menu items
-    g_list_foreach (main_menu->priv->bookmark_menuitems, (GFunc)gtk_widget_destroy, NULL);
+    g_list_foreach (main_menu->priv->bookmark_menuitems, (GFunc) gtk_widget_destroy, NULL);
     g_list_free (main_menu->priv->bookmark_menuitems);
     main_menu->priv->bookmark_menuitems = NULL;
 
     // Remove all old group menu items
-    g_list_foreach (main_menu->priv->group_menuitems, (GFunc)gtk_widget_destroy, NULL);
+    g_list_foreach (main_menu->priv->group_menuitems, (GFunc) gtk_widget_destroy, NULL);
     g_list_free (main_menu->priv->group_menuitems);
     main_menu->priv->group_menuitems = NULL;
 

Modified: trunk/src/gnome-cmd-main-win.cc
==============================================================================
--- trunk/src/gnome-cmd-main-win.cc	(original)
+++ trunk/src/gnome-cmd-main-win.cc	Mon Aug 25 17:29:14 2008
@@ -333,7 +333,7 @@
 
     GtkWidget *menu = gtk_menu_new ();
     gtk_widget_ref (menu);
-    gtk_object_set_data_full (GTK_OBJECT (main_win), "slide-popup", menu, (GtkDestroyNotify)gtk_widget_unref);
+    gtk_object_set_data_full (GTK_OBJECT (main_win), "slide-popup", menu, (GtkDestroyNotify) gtk_widget_unref);
 
     // Fill the menu
 
@@ -518,7 +518,7 @@
     if (!column_resize_lock)
     {
         column_resize_lock = TRUE;
-        gnome_cmd_data_set_fs_col_width ((guint)column, width);
+        gnome_cmd_data_set_fs_col_width ((guint) column, width);
         gtk_clist_set_column_width (other_clist, column, width);
         column_resize_lock = FALSE;
     }
@@ -843,7 +843,7 @@
     gtk_window_add_accel_group (GTK_WINDOW (main_win), mw->priv->accel_group);
     gnome_cmd_main_win_focus_file_lists (main_win);
 
-    mw->priv->key_snooper_id = gtk_key_snooper_install((GtkKeySnoopFunc)gnome_cmd_key_snooper,(gpointer)mw);
+    mw->priv->key_snooper_id = gtk_key_snooper_install((GtkKeySnoopFunc) gnome_cmd_key_snooper,(gpointer) mw);
 }
 
 

Modified: trunk/src/gnome-cmd-notebook.cc
==============================================================================
--- trunk/src/gnome-cmd-notebook.cc	(original)
+++ trunk/src/gnome-cmd-notebook.cc	Mon Aug 25 17:29:14 2008
@@ -51,8 +51,6 @@
 }
 
 
-// #define GNOME_CMD_NOTEBOOK_CLASS(klass)  (G_TYPE_CHECK_CLASS_CAST((klass), GNOME_CMD_TYPE_NOTEBOOK, GnomeCmdNotebookClass))
-
 G_DEFINE_TYPE (GnomeCmdNotebook, gnome_cmd_notebook, GTK_TYPE_NOTEBOOK)
 
 
@@ -75,9 +73,9 @@
 
 static void gnome_cmd_notebook_class_init (GnomeCmdNotebookClass *klass)
 {
-    gnome_cmd_notebook_parent_class = (GObjectClass*) g_type_class_peek_parent (klass);
+    gnome_cmd_notebook_parent_class = (GObjectClass *) g_type_class_peek_parent (klass);
 
-    GObjectClass *object_class = (GObjectClass*) klass;
+    GObjectClass *object_class = (GObjectClass *) klass;
 
     object_class->finalize = gnome_cmd_notebook_finalize;
 }

Modified: trunk/src/gnome-cmd-options-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-options-dialog.cc	(original)
+++ trunk/src/gnome-cmd-options-dialog.cc	Mon Aug 25 17:29:14 2008
@@ -260,7 +260,7 @@
 
     label = create_label (parent, "");
     gtk_object_set_data_full (GTK_OBJECT (parent), "date_format_test_label",
-                              label, (GtkDestroyNotify)gtk_widget_unref);
+                              label, (GtkDestroyNotify) gtk_widget_unref);
     gtk_signal_connect (GTK_OBJECT (label), "realize",GTK_SIGNAL_FUNC (on_date_format_update), parent);
     table_add (table, label, 1, 1, (GtkAttachOptions) (GTK_EXPAND|GTK_FILL));
 
@@ -311,7 +311,7 @@
     g_return_if_fail (GTK_IS_OPTION_MENU (optmenu));
 
     GtkWidget *icon_frame = lookup_widget (GTK_WIDGET (dialog), "mime_icon_settings_frame");
-    GnomeCmdLayout mode = (GnomeCmdLayout)gtk_option_menu_get_history (GTK_OPTION_MENU (optmenu));
+    GnomeCmdLayout mode = (GnomeCmdLayout) gtk_option_menu_get_history (GTK_OPTION_MENU (optmenu));
 
     if (icon_frame)
         gtk_widget_set_sensitive (icon_frame, mode == GNOME_CMD_LAYOUT_MIME_ICONS);
@@ -323,7 +323,7 @@
     g_return_if_fail (GTK_IS_OPTION_MENU (optmenu));
 
     GtkWidget *btn = lookup_widget (GTK_WIDGET (dialog), "color_btn");
-    GnomeCmdColorMode mode = (GnomeCmdColorMode)gtk_option_menu_get_history (GTK_OPTION_MENU (optmenu));
+    GnomeCmdColorMode mode = (GnomeCmdColorMode) gtk_option_menu_get_history (GTK_OPTION_MENU (optmenu));
 
     if (btn)
         gtk_widget_set_sensitive (btn, mode == GNOME_CMD_COLOR_CUSTOM);
@@ -413,15 +413,15 @@
         colors->curs_bg->red, colors->curs_bg->green, colors->curs_bg->blue, 0);
 
     label = create_label (dlg, _("Foreground"));
-    table_add (table, label, 1, 0, (GtkAttachOptions)GTK_FILL);
+    table_add (table, label, 1, 0, (GtkAttachOptions) GTK_FILL);
     label = create_label (dlg, _("Background"));
-    table_add (table, label, 2, 0, (GtkAttachOptions)GTK_FILL);
+    table_add (table, label, 2, 0, (GtkAttachOptions) GTK_FILL);
     label = create_label (dlg, _("Default:"));
-    table_add (table, label, 0, 1, (GtkAttachOptions)GTK_FILL);
+    table_add (table, label, 0, 1, (GtkAttachOptions) GTK_FILL);
     label = create_label (dlg, _("Selected file:"));
-    table_add (table, label, 0, 2, (GtkAttachOptions)GTK_FILL);
+    table_add (table, label, 0, 2, (GtkAttachOptions) GTK_FILL);
     label = create_label (dlg, _("Cursor:"));
-    table_add (table, label, 0, 3, (GtkAttachOptions)GTK_FILL);
+    table_add (table, label, 0, 3, (GtkAttachOptions) GTK_FILL);
 
     gnome_cmd_dialog_add_button (GNOME_CMD_DIALOG (dlg), GNOME_STOCK_BUTTON_CLOSE,
                                  GTK_SIGNAL_FUNC (on_edit_colors_close), dlg);
@@ -531,27 +531,27 @@
     gtk_box_pack_start (GTK_BOX (vbox), cat, FALSE, FALSE, 0);
 
     spin = create_spin (parent, "iconsize_spin", 8, 64, gnome_cmd_data_get_icon_size());
-    table_add (table, spin, 1, 0, (GtkAttachOptions)GTK_FILL);
+    table_add (table, spin, 1, 0, (GtkAttachOptions) GTK_FILL);
     scale = create_scale (parent, "iconquality_scale", gnome_cmd_data_get_icon_scale_quality (), 0, 3);
-    table_add (table, scale, 1, 1, (GtkAttachOptions)GTK_FILL);
+    table_add (table, scale, 1, 1, (GtkAttachOptions) GTK_FILL);
     entry = create_file_entry (parent, "theme_icondir_entry", gnome_cmd_data_get_theme_icon_dir());
     table_add (table, entry, 1, 2, (GtkAttachOptions)0);
     entry = create_file_entry (parent, "doc_icondir_entry", gnome_cmd_data_get_document_icon_dir());
     table_add (table, entry, 1, 3, (GtkAttachOptions)0);
 
     label = create_label (parent, _("Icon size:"));
-    table_add (table, label, 0, 0, (GtkAttachOptions)GTK_FILL);
+    table_add (table, label, 0, 0, (GtkAttachOptions) GTK_FILL);
     label = create_label (parent, _("Scaling quality:"));
-    table_add (table, label, 0, 1, (GtkAttachOptions)GTK_FILL);
+    table_add (table, label, 0, 1, (GtkAttachOptions) GTK_FILL);
     label = create_label (parent, _("Theme icon directory:"));
-    table_add (table, label, 0, 2, (GtkAttachOptions)GTK_FILL);
+    table_add (table, label, 0, 2, (GtkAttachOptions) GTK_FILL);
     label = create_label (parent, _("Document icon directory:"));
-    table_add (table, label, 0, 3, (GtkAttachOptions)GTK_FILL);
+    table_add (table, label, 0, 3, (GtkAttachOptions) GTK_FILL);
 
 
-    gtk_option_menu_set_history (GTK_OPTION_MENU (fe_optmenu), (gint)gnome_cmd_data_get_ext_disp_mode ());
-    gtk_option_menu_set_history (GTK_OPTION_MENU (lm_optmenu), (gint)gnome_cmd_data_get_layout ());
-    gtk_option_menu_set_history (GTK_OPTION_MENU (cm_optmenu), (gint)gnome_cmd_data_get_color_mode ());
+    gtk_option_menu_set_history (GTK_OPTION_MENU (fe_optmenu), (gint) gnome_cmd_data_get_ext_disp_mode ());
+    gtk_option_menu_set_history (GTK_OPTION_MENU (lm_optmenu), (gint) gnome_cmd_data_get_layout ());
+    gtk_option_menu_set_history (GTK_OPTION_MENU (cm_optmenu), (gint) gnome_cmd_data_get_color_mode ());
 
     return frame;
 }
@@ -573,11 +573,11 @@
     GtkWidget *list_font_picker = lookup_widget (GTK_WIDGET (dialog), "list_font_picker");
 
     gnome_cmd_data_set_ext_disp_mode (
-        (GnomeCmdExtDispMode)gtk_option_menu_get_history (GTK_OPTION_MENU (fe_optmenu)));
+        (GnomeCmdExtDispMode) gtk_option_menu_get_history (GTK_OPTION_MENU (fe_optmenu)));
     gnome_cmd_data_set_layout (
-        (GnomeCmdLayout)gtk_option_menu_get_history (GTK_OPTION_MENU (lm_optmenu)));
+        (GnomeCmdLayout) gtk_option_menu_get_history (GTK_OPTION_MENU (lm_optmenu)));
     gnome_cmd_data_set_color_mode (
-        (GnomeCmdColorMode)gtk_option_menu_get_history (GTK_OPTION_MENU (cm_optmenu)));
+        (GnomeCmdColorMode) gtk_option_menu_get_history (GTK_OPTION_MENU (cm_optmenu)));
 
     gnome_cmd_data_set_use_ls_colors (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (use_ls)));
 

Modified: trunk/src/gnome-cmd-python-plugin.cc
==============================================================================
--- trunk/src/gnome-cmd-python-plugin.cc	(original)
+++ trunk/src/gnome-cmd-python-plugin.cc	Mon Aug 25 17:29:14 2008
@@ -150,7 +150,7 @@
 {
     for (GList *l=py_plugins; l; l=l->next)
     {
-        PythonPluginData *data = (PythonPluginData *)l->data;
+        PythonPluginData *data = (PythonPluginData *) l->data;
         g_free (data->name);
         g_free (data->path);
         // do not free data->fname, as it points to a part of data->path

Modified: trunk/src/gnome-cmd-search-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-search-dialog.cc	(original)
+++ trunk/src/gnome-cmd-search-dialog.cc	Mon Aug 25 17:29:14 2008
@@ -354,7 +354,7 @@
     // Unref all directories which contained matching files from last search
     if (data->match_dirs)
     {
-        g_list_foreach (data->match_dirs, (GFunc)gnome_cmd_dir_unref, NULL);
+        g_list_foreach (data->match_dirs, (GFunc) gnome_cmd_dir_unref, NULL);
         g_list_free (data->match_dirs);
         data->match_dirs = NULL;
     }

Modified: trunk/src/gnome-cmd-smb-net.cc
==============================================================================
--- trunk/src/gnome-cmd-smb-net.cc	(original)
+++ trunk/src/gnome-cmd-smb-net.cc	Mon Aug 25 17:29:14 2008
@@ -106,7 +106,7 @@
     g_hash_table_insert (entities, ent->name, ent);
     current_wg_name = ent->name;
     hosts = get_hosts (ent->name);
-    g_list_foreach (hosts, (GFunc)add_host_to_map, NULL);
+    g_list_foreach (hosts, (GFunc) add_host_to_map, NULL);
 }
 
 
@@ -131,10 +131,10 @@
         g_hash_table_destroy (entities);
 
     entities = g_hash_table_new_full (
-        (GHashFunc)str_hash, (GEqualFunc)str_ncase_equal, (GDestroyNotify)g_free, (GDestroyNotify)g_free);
+        (GHashFunc) str_hash, (GEqualFunc) str_ncase_equal, (GDestroyNotify) g_free, (GDestroyNotify) g_free);
 
     GList *wgs = get_wgs ();
-    g_list_foreach (wgs, (GFunc)add_wg_to_map, NULL);
+    g_list_foreach (wgs, (GFunc) add_wg_to_map, NULL);
 }
 
 

Modified: trunk/src/imageloader.cc
==============================================================================
--- trunk/src/imageloader.cc	(original)
+++ trunk/src/imageloader.cc	Mon Aug 25 17:29:14 2008
@@ -492,7 +492,7 @@
 {
     g_return_if_fail (mime_cache != NULL);
 
-    g_hash_table_foreach_remove (mime_cache, (GHRFunc)remove_entry, NULL);
+    g_hash_table_foreach_remove (mime_cache, (GHRFunc) remove_entry, NULL);
 }
 
 

Modified: trunk/src/intviewer/scroll-box.cc
==============================================================================
--- trunk/src/intviewer/scroll-box.cc	(original)
+++ trunk/src/intviewer/scroll-box.cc	Mon Aug 25 17:29:14 2008
@@ -175,15 +175,15 @@
     {
         if (obj->priv->client)
             g_object_unref (G_OBJECT (obj->priv->client));
-        obj->priv->client=NULL;
+        obj->priv->client = NULL;
     }
 
     g_object_ref (G_OBJECT (client));
     gtk_widget_show (client);
     obj->priv->client = client;
     gtk_table_attach (GTK_TABLE (obj), client , 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+                      (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                      (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
 }
 
 

Modified: trunk/src/intviewer/searcher.cc
==============================================================================
--- trunk/src/intviewer/searcher.cc	(original)
+++ trunk/src/intviewer/searcher.cc	Mon Aug 25 17:29:14 2008
@@ -93,12 +93,12 @@
             sizeof (GViewerSearcherClass),
             NULL,
             NULL,
-            (GClassInitFunc)g_viewer_searcher_class_init,
+            (GClassInitFunc) g_viewer_searcher_class_init,
             NULL,
             NULL,
             sizeof (GViewerSearcher),
             0,
-            (GInstanceInitFunc)g_viewer_searcher_init,
+            (GInstanceInitFunc) g_viewer_searcher_init,
         };
 
         type = g_type_register_static (G_TYPE_OBJECT, "GViewerSearcher", &our_info, (GTypeFlags) 0);

Modified: trunk/src/intviewer/text-render.cc
==============================================================================
--- trunk/src/intviewer/text-render.cc	(original)
+++ trunk/src/intviewer/text-render.cc	Mon Aug 25 17:29:14 2008
@@ -681,7 +681,7 @@
     {
         gtk_grab_add (widget);
         w->priv->button = event->button;
-        w->priv->marker_start  = w->priv->pixel_to_offset(w, (int)event->x, (int)event->y, TRUE);
+        w->priv->marker_start  = w->priv->pixel_to_offset(w, (int) event->x, (int) event->y, TRUE);
     }
 
     return FALSE;
@@ -770,7 +770,7 @@
         gtk_signal_emit_by_name (GTK_OBJECT (obj->priv->h_adjustment), "value-changed");
     }
 
-    obj->priv->column = (int)new_value;
+    obj->priv->column = (int) new_value;
 
     text_render_redraw(obj);
 }
@@ -828,7 +828,7 @@
         return;
 
     if (obj->priv->dp)
-        new_value = gv_align_offset_to_line_start(obj->priv->dp, (offset_type)new_value);
+        new_value = gv_align_offset_to_line_start(obj->priv->dp, (offset_type) new_value);
 
     if (new_value != obj->priv->v_adjustment->value)
     {
@@ -1095,7 +1095,7 @@
         // Check if the char is displayable. Caused trouble to pango
         if (is_displayable((guchar)i))
         {
-            sprintf (str, "%c", (gchar)i);
+            sprintf (str, "%c", (gchar) i);
             pango_layout_set_text(layout, str, -1);
             pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
         }
@@ -1920,10 +1920,10 @@
         char_type value = gv_input_mode_get_raw_byte(obj->priv->im, current);
         if (value==INVALID_CHAR)
             break;
-        text_render_utf8_printf(obj, "%02x ", (unsigned char)value);
+        text_render_utf8_printf(obj, "%02x ", (unsigned char) value);
     }
 
-    gtk_clipboard_set_text(clip, (const gchar*) obj->priv->utf8buf, obj->priv->utf8buf_length);
+    gtk_clipboard_set_text(clip, (const gchar *) obj->priv->utf8buf, obj->priv->utf8buf_length);
 }
 
 

Modified: trunk/src/intviewer/viewer-widget.cc
==============================================================================
--- trunk/src/intviewer/viewer-widget.cc	(original)
+++ trunk/src/intviewer/viewer-widget.cc	Mon Aug 25 17:29:14 2008
@@ -205,8 +205,8 @@
 
     g_snprintf(temp, sizeof (temp),
                _("Position: %lu of %lu\tColumn: %d\t%s"),
-               (unsigned long)status->current_offset,
-               (unsigned long)status->size,
+               (unsigned long) status->current_offset,
+               (unsigned long) status->size,
                status->column,
                status->wrap_mode?_("Wrap"):"");
 

Modified: trunk/src/intviewer/viewer-window.cc
==============================================================================
--- trunk/src/intviewer/viewer-window.cc	(original)
+++ trunk/src/intviewer/viewer-window.cc	Mon Aug 25 17:29:14 2008
@@ -285,8 +285,8 @@
 
 #ifdef EXTERNAL_TOOLS
     w->priv->external_tools = g_hash_table_new_full(g_str_hash, g_str_equal,
-                    (GDestroyNotify)gviewer_window_destroy_key,
-                    (GDestroyNotify)gviewer_window_destroy_external_tool);
+                    (GDestroyNotify) gviewer_window_destroy_key,
+                    (GDestroyNotify) gviewer_window_destroy_external_tool);
 #endif
 
     GtkWindow *win = GTK_WINDOW (w);

Modified: trunk/src/utils.cc
==============================================================================
--- trunk/src/utils.cc	(original)
+++ trunk/src/utils.cc	Mon Aug 25 17:29:14 2008
@@ -805,7 +805,7 @@
 
 GList *string_history_add (GList *in, const gchar *value, guint maxsize)
 {
-    GList *tmp = g_list_find_custom (in, (gchar *) value, (GCompareFunc)strcmp);
+    GList *tmp = g_list_find_custom (in, (gchar *) value, (GCompareFunc) strcmp);
     GList *out;
 
     // if the same value has been given before move it first in the list
@@ -1317,7 +1317,7 @@
 {
     g_return_if_fail (pattern_list != NULL);
 
-    g_list_foreach (pattern_list, (GFunc)g_free, NULL);
+    g_list_foreach (pattern_list, (GFunc) g_free, NULL);
     g_list_free (pattern_list);
 }
 

Modified: trunk/src/utils.h
==============================================================================
--- trunk/src/utils.h	(original)
+++ trunk/src/utils.h	Mon Aug 25 17:29:14 2008
@@ -269,7 +269,7 @@
 
 // Insert an item with an inline xpm icon and a user data pointer
 #define GNOMEUIINFO_ITEM_FILENAME(label, tooltip, callback, filename) \
-    { GNOME_APP_UI_ITEM, label, tooltip, (gpointer)callback, NULL, NULL, \
+    { GNOME_APP_UI_ITEM, label, tooltip, (gpointer) callback, NULL, NULL, \
         GNOME_APP_PIXMAP_FILENAME, filename, 0, (GdkModifierType) 0, NULL }
 
 



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