gnome-commander r2313 - in trunk: . src src/intviewer
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r2313 - in trunk: . src src/intviewer
- Date: Tue, 25 Nov 2008 21:10:18 +0000 (UTC)
Author: epiotr
Date: Tue Nov 25 21:10:18 2008
New Revision: 2313
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=2313&view=rev
Log:
Code cleanup
Modified:
trunk/ChangeLog
trunk/src/gnome-cmd-advrename-dialog.cc
trunk/src/gnome-cmd-data.h
trunk/src/gnome-cmd-search-dialog.cc
trunk/src/intviewer/search-dlg.cc
Modified: trunk/src/gnome-cmd-advrename-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-advrename-dialog.cc (original)
+++ trunk/src/gnome-cmd-advrename-dialog.cc Tue Nov 25 21:10:18 2008
@@ -403,7 +403,7 @@
case METATAG_MENU:
{
- GtkItemFactoryEntry *items = g_try_new0(GtkItemFactoryEntry, G_N_ELEMENTS(metatags));
+ GtkItemFactoryEntry *items = g_try_new0 (GtkItemFactoryEntry, G_N_ELEMENTS(metatags));
g_return_val_if_fail (items != NULL, NULL);
Modified: trunk/src/gnome-cmd-data.h
==============================================================================
--- trunk/src/gnome-cmd-data.h (original)
+++ trunk/src/gnome-cmd-data.h Tue Nov 25 21:10:18 2008
@@ -38,7 +38,7 @@
RIGHT_BUTTON_SELECTS
};
- enum {PATTERN_HISTORY_SIZE=10};
+ enum {SEARCH_HISTORY_SIZE=10, ADVRENAME_HISTORY_SIZE=10, INTVIEWER_HISTORY_SIZE=16};
struct SearchConfig
{
@@ -49,9 +49,9 @@
gboolean case_sens;
gint width, height;
- SearchConfig(): name_patterns(PATTERN_HISTORY_SIZE),
- directories(PATTERN_HISTORY_SIZE),
- content_patterns(PATTERN_HISTORY_SIZE),
+ SearchConfig(): name_patterns(SEARCH_HISTORY_SIZE),
+ directories(SEARCH_HISTORY_SIZE),
+ content_patterns(SEARCH_HISTORY_SIZE),
recursive(TRUE), case_sens(FALSE),
width(600), height(400) {}
};
@@ -66,7 +66,7 @@
guint counter_precision;
gint width, height;
- AdvrenameConfig(): templates(10), regexes(NULL),
+ AdvrenameConfig(): templates(ADVRENAME_HISTORY_SIZE), regexes(NULL),
counter_start(1), counter_increment(1), counter_precision(1), // defaults for
width(600), height(400) {} // advrename settings
~AdvrenameConfig() { if (regexes) g_object_unref (regexes); }
Modified: trunk/src/gnome-cmd-search-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-search-dialog.cc (original)
+++ trunk/src/gnome-cmd-search-dialog.cc Tue Nov 25 21:10:18 2008
@@ -23,11 +23,11 @@
#include <regex.h>
#include "gnome-cmd-includes.h"
+#include "gnome-cmd-data.h"
#include "gnome-cmd-search-dialog.h"
#include "gnome-cmd-dir.h"
#include "gnome-cmd-file-list.h"
#include "gnome-cmd-file-selector.h"
-#include "gnome-cmd-data.h"
#include "gnome-cmd-main-win.h"
#include "filter.h"
#include "utils.h"
Modified: trunk/src/intviewer/search-dlg.cc
==============================================================================
--- trunk/src/intviewer/search-dlg.cc (original)
+++ trunk/src/intviewer/search-dlg.cc Tue Nov 25 21:10:18 2008
@@ -185,7 +185,7 @@
gtk_widget_set_sensitive(sdlg->priv->case_sensitive_checkbox, FALSE);
- // Check if the text in the Entry-Box is valud hex, otherwise disable the "Find" button
+ // Check if the text in the GtkEntryBox has hex value, otherwise disable the "Find" button
GtkEntry *w = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (sdlg->priv->entry)));
entry_changed (w, (gpointer) sdlg);
}
@@ -288,7 +288,7 @@
{
// Only if the use entered a valid hex string, enable the "find" button
guint len;
- guint8 *buf = text2hex(gtk_entry_get_text(entry), &len);
+ guint8 *buf = text2hex (gtk_entry_get_text (entry), &len);
enable = (buf!=NULL) && (len>0);
g_free (buf);
@@ -296,9 +296,9 @@
else
{
// SEARCH_MODE_TEXT
- enable = (strlen(gtk_entry_get_text(entry))>0);
+ enable = strlen (gtk_entry_get_text (entry))>0;
}
- gtk_dialog_set_response_sensitive(GTK_DIALOG(user_data), GTK_RESPONSE_OK, enable);
+ gtk_dialog_set_response_sensitive (GTK_DIALOG (user_data), GTK_RESPONSE_OK, enable);
}
@@ -330,7 +330,7 @@
// Label
sdlg->priv->label = gtk_label_new(NULL);
- gtk_label_set_markup_with_mnemonic(GTK_LABEL(sdlg->priv->label), "_Search for:");
+ gtk_label_set_markup_with_mnemonic (GTK_LABEL (sdlg->priv->label), "_Search for:");
gtk_table_attach(table, sdlg->priv->label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
// Entry Box
@@ -433,7 +433,7 @@
(GInstanceInitFunc) search_dlg_init,
};
- ttt_type = g_type_register_static (GTK_TYPE_DIALOG, "GViewerSearchDlg", &ttt_info, (GTypeFlags) 0);
+ ttt_type = g_type_register_static (GTK_TYPE_DIALOG, "GViewerSearchDlg", &ttt_info, (GTypeFlags) 0);
}
return ttt_type;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]