[gnome-commander/gcmd-1-3] noop: code cleanup
- From: Piotr Eljasiak <epiotr src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-commander/gcmd-1-3] noop: code cleanup
- Date: Mon, 1 Jun 2009 15:56:57 -0400 (EDT)
commit 389940c20ab0cf39ef553cc6d88ecbfda1783253
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Mon Jun 1 19:23:29 2009 +0200
noop: code cleanup
---
plugins/cvs/cvs-plugin.c | 28 +++++++++--------------
src/dialogs/gnome-cmd-advrename-regex-dialog.cc | 2 +-
src/gnome-cmd-bookmark-dialog.cc | 6 +++-
src/gnome-cmd-search-dialog.cc | 24 +++++--------------
4 files changed, 22 insertions(+), 38 deletions(-)
diff --git a/plugins/cvs/cvs-plugin.c b/plugins/cvs/cvs-plugin.c
index ddf30bb..b16a5bb 100644
--- a/plugins/cvs/cvs-plugin.c
+++ b/plugins/cvs/cvs-plugin.c
@@ -188,28 +188,22 @@ static GtkWidget *create_menu_item (const gchar *name, gboolean show_pixmap,
static GtkWidget *create_main_menu (GnomeCmdPlugin *p, GnomeCmdState *state)
{
- GtkWidget *item, *child;
CvsPlugin *plugin = CVS_PLUGIN (p);
GtkMenu *submenu = GTK_MENU (gtk_menu_new ());
- item = create_menu_item ("CVS", FALSE, NULL, NULL, plugin);
+ GtkWidget *item = create_menu_item ("CVS", FALSE, NULL, NULL, plugin);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), GTK_WIDGET (submenu));
- plugin->priv->update = child =
- create_menu_item ("Update", FALSE, GTK_SIGNAL_FUNC (on_dummy), state, plugin);
- gtk_menu_append (submenu, child);
- plugin->priv->diff = child =
- create_menu_item ("Diff", FALSE, GTK_SIGNAL_FUNC (on_diff), state, plugin);
- gtk_menu_append (submenu, child);
- plugin->priv->log = child =
- create_menu_item ("Log", FALSE, GTK_SIGNAL_FUNC (on_log), state, plugin);
- gtk_menu_append (submenu, child);
- plugin->priv->last_log = child =
- create_menu_item ("Last Log", FALSE, GTK_SIGNAL_FUNC (on_dummy), state, plugin);
- gtk_menu_append (submenu, child);
- plugin->priv->last_change = child =
- create_menu_item ("Last Change", FALSE, GTK_SIGNAL_FUNC (on_dummy), state, plugin);
- gtk_menu_append (submenu, child);
+ plugin->priv->update = create_menu_item ("Update", FALSE, GTK_SIGNAL_FUNC (on_dummy), state, plugin);
+ gtk_menu_append (submenu, plugin->priv->update);
+ plugin->priv->diff = create_menu_item ("Diff", FALSE, GTK_SIGNAL_FUNC (on_diff), state, plugin);
+ gtk_menu_append (submenu, plugin->priv->diff);
+ plugin->priv->log = create_menu_item ("Log", FALSE, GTK_SIGNAL_FUNC (on_log), state, plugin);
+ gtk_menu_append (submenu, plugin->priv->log);
+ plugin->priv->last_log = create_menu_item ("Last Log", FALSE, GTK_SIGNAL_FUNC (on_dummy), state, plugin);
+ gtk_menu_append (submenu, plugin->priv->last_log);
+ plugin->priv->last_change = create_menu_item ("Last Change", FALSE, GTK_SIGNAL_FUNC (on_dummy), state, plugin);
+ gtk_menu_append (submenu, plugin->priv->last_change);
return item;
}
diff --git a/src/dialogs/gnome-cmd-advrename-regex-dialog.cc b/src/dialogs/gnome-cmd-advrename-regex-dialog.cc
index b993edc..5f1dd73 100644
--- a/src/dialogs/gnome-cmd-advrename-regex-dialog.cc
+++ b/src/dialogs/gnome-cmd-advrename-regex-dialog.cc
@@ -69,7 +69,7 @@ gboolean gnome_cmd_advrename_regex_dialog_new (const gchar *title, GtkWindow *pa
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->action_area),6);
- GtkWidget *table, *align, *label, *entry, *check, *box;
+ GtkWidget *table, *align, *label, *entry, *check;
table = gtk_table_new (3, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 5);
diff --git a/src/gnome-cmd-bookmark-dialog.cc b/src/gnome-cmd-bookmark-dialog.cc
index 42507d5..63547f2 100644
--- a/src/gnome-cmd-bookmark-dialog.cc
+++ b/src/gnome-cmd-bookmark-dialog.cc
@@ -272,7 +272,8 @@ static void on_dir_move_up (GtkButton *button, GnomeCmdBookmarkDialog *dialog)
{
GtkCList *dir_list = GTK_CLIST (dialog->priv->dir_list);
- if (dir_list->focus_row >= 1) {
+ if (dir_list->focus_row >= 1)
+ {
gtk_clist_row_move (dir_list, dir_list->focus_row, dir_list->focus_row-1);
update_move_buttons (dialog, dir_list->focus_row);
}
@@ -283,7 +284,8 @@ static void on_dir_move_down (GtkButton *button, GnomeCmdBookmarkDialog *dialog)
{
GtkCList *dir_list = GTK_CLIST (dialog->priv->dir_list);
- if (dir_list->focus_row >= 0) {
+ if (dir_list->focus_row >= 0)
+ {
gtk_clist_row_move (dir_list, dir_list->focus_row, dir_list->focus_row+1);
update_move_buttons (dialog, dir_list->focus_row);
}
diff --git a/src/gnome-cmd-search-dialog.cc b/src/gnome-cmd-search-dialog.cc
index 034ff1c..c2c5068 100644
--- a/src/gnome-cmd-search-dialog.cc
+++ b/src/gnome-cmd-search-dialog.cc
@@ -130,9 +130,7 @@ inline void set_statusmsg (SearchData *data, gchar *msg)
gtk_statusbar_push (GTK_STATUSBAR (data->dialog->priv->statusbar), data->context_id, msg);
}
-/**
- *
- */
+
inline void search_file_data_free (SearchFileData *searchfile_data)
{
if (searchfile_data->handle != NULL)
@@ -145,9 +143,7 @@ inline void search_file_data_free (SearchFileData *searchfile_data)
/**
* Loads a file in chunks and returns the content.
*/
-static SearchFileData *read_search_file (SearchData *data,
- SearchFileData *searchfile_data,
- GnomeCmdFile *f)
+static SearchFileData *read_search_file (SearchData *data, SearchFileData *searchfile_data, GnomeCmdFile *f)
{
g_return_val_if_fail (f != NULL, NULL);
g_return_val_if_fail (f->info != NULL, NULL);
@@ -621,10 +617,7 @@ static void on_stop (GtkButton *button, GnomeCmdSearchDialog *dialog)
}
-/**
- * The user has clicked on the go to button
- *
- */
+// The user has clicked on the "go to" button
static void on_goto (GtkButton *button, GnomeCmdSearchDialog *dialog)
{
GnomeCmdFile *f = dialog->priv->result_list->get_selected_file();
@@ -646,7 +639,7 @@ static void on_goto (GtkButton *button, GnomeCmdSearchDialog *dialog)
}
-static gboolean handle_list_keypress (GnomeCmdFileList *fl, GdkEventKey *event, GnomeCmdSearchDialog *dialog)
+inline gboolean handle_list_keypress (GnomeCmdFileList *fl, GdkEventKey *event, GnomeCmdSearchDialog *dialog)
{
switch (event->keyval)
{
@@ -662,9 +655,7 @@ static gboolean handle_list_keypress (GnomeCmdFileList *fl, GdkEventKey *event,
return FALSE;
}
-/*
- *
- */
+
static gboolean on_list_keypressed (GtkWidget *result_list, GdkEventKey *event, gpointer dialog)
{
if (GNOME_CMD_FILE_LIST (result_list)->key_pressed(event) ||
@@ -678,10 +669,7 @@ static gboolean on_list_keypressed (GtkWidget *result_list, GdkEventKey *event,
}
-/**
- * The user has clicked on the "search by content" checkbutton.
- *
- */
+// The user has clicked on the "search by content" checkbutton.
static void find_text_toggled (GtkToggleButton *togglebutton, GnomeCmdSearchDialog *dialog)
{
if (gtk_toggle_button_get_active (togglebutton))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]