[gnome-commander] noop: code cleanup
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] noop: code cleanup
- Date: Fri, 10 Jun 2011 20:50:33 +0000 (UTC)
commit c1def59ad66bf37a8d3f75263b5a07844e38ad03
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Fri Jun 10 22:33:52 2011 +0200
noop: code cleanup
src/intviewer/fileops.cc | 2 +-
src/intviewer/scroll-box.cc | 18 +++++++++---------
src/intviewer/search-dlg.cc | 10 +++++-----
src/intviewer/search-progress-dlg.cc | 26 +++++++++++++-------------
src/intviewer/viewer-window.cc | 16 ++++++++--------
5 files changed, 36 insertions(+), 36 deletions(-)
---
diff --git a/src/intviewer/fileops.cc b/src/intviewer/fileops.cc
index bbbc7c4..71d212a 100644
--- a/src/intviewer/fileops.cc
+++ b/src/intviewer/fileops.cc
@@ -174,7 +174,7 @@ int gv_file_open_fd(ViewerFileOps *ops, int filedesc)
}
-int gv_file_open(ViewerFileOps *ops, const gchar* _file)
+int gv_file_open(ViewerFileOps *ops, const gchar *_file)
{
g_free (ops->filename);
diff --git a/src/intviewer/scroll-box.cc b/src/intviewer/scroll-box.cc
index 30a743c..0c4d7f2 100644
--- a/src/intviewer/scroll-box.cc
+++ b/src/intviewer/scroll-box.cc
@@ -149,7 +149,7 @@ GtkRange *scroll_box_get_v_range(ScrollBox *obj)
{
g_return_val_if_fail (IS_SCROLL_BOX (obj), FALSE);
- return GTK_RANGE(obj->priv->vscroll);
+ return GTK_RANGE (obj->priv->vscroll);
}
@@ -195,31 +195,31 @@ GtkWidget *scroll_box_get_client (ScrollBox *obj)
void scroll_box_set_h_adjustment (ScrollBox *obj, GtkAdjustment *adjustment)
{
- g_return_if_fail (IS_SCROLL_BOX(obj));
+ g_return_if_fail (IS_SCROLL_BOX (obj));
- gtk_range_set_adjustment(GTK_RANGE(obj->priv->hscroll), adjustment);
+ gtk_range_set_adjustment (GTK_RANGE (obj->priv->hscroll), adjustment);
}
void scroll_box_set_v_adjustment (ScrollBox *obj, GtkAdjustment *adjustment)
{
- g_return_if_fail (IS_SCROLL_BOX(obj));
+ g_return_if_fail (IS_SCROLL_BOX (obj));
- gtk_range_set_adjustment(GTK_RANGE(obj->priv->vscroll), adjustment);
+ gtk_range_set_adjustment (GTK_RANGE (obj->priv->vscroll), adjustment);
}
GtkAdjustment *scroll_box_get_h_adjustment (ScrollBox *obj)
{
- g_return_val_if_fail (IS_SCROLL_BOX(obj), NULL);
+ g_return_val_if_fail (IS_SCROLL_BOX (obj), NULL);
- return gtk_range_get_adjustment (GTK_RANGE(obj->priv->hscroll));
+ return gtk_range_get_adjustment (GTK_RANGE (obj->priv->hscroll));
}
GtkAdjustment *scroll_box_get_v_adjustment (ScrollBox *obj)
{
- g_return_val_if_fail (IS_SCROLL_BOX(obj), NULL);
+ g_return_val_if_fail (IS_SCROLL_BOX (obj), NULL);
- return gtk_range_get_adjustment (GTK_RANGE(obj->priv->vscroll));
+ return gtk_range_get_adjustment (GTK_RANGE (obj->priv->vscroll));
}
diff --git a/src/intviewer/search-dlg.cc b/src/intviewer/search-dlg.cc
index d6eb649..ea25414 100644
--- a/src/intviewer/search-dlg.cc
+++ b/src/intviewer/search-dlg.cc
@@ -205,11 +205,11 @@ static void class_init (GViewerSearchDlgClass *klass)
void entry_changed (GtkEntry *entry, gpointer user_data)
{
- g_return_if_fail (IS_GVIEWER_SEARCH_DLG(user_data));
+ g_return_if_fail (IS_GVIEWER_SEARCH_DLG (user_data));
gboolean enable = FALSE;
- GViewerSearchDlg *sdlg = GVIEWER_SEARCH_DLG(user_data);
+ GViewerSearchDlg *sdlg = GVIEWER_SEARCH_DLG (user_data);
g_return_if_fail (sdlg->priv!=NULL);
if (sdlg->priv->searchmode==SEARCH_MODE_HEX)
@@ -272,7 +272,7 @@ static void search_dlg_init (GViewerSearchDlg *sdlg)
// Search mode radio buttons
sdlg->priv->text_mode = gtk_radio_button_new_with_mnemonic(NULL, _("_Text"));
- sdlg->priv->hex_mode = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(sdlg->priv->text_mode), _("_Hexadecimal"));
+ sdlg->priv->hex_mode = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON (sdlg->priv->text_mode), _("_Hexadecimal"));
g_signal_connect (sdlg->priv->text_mode, "toggled", G_CALLBACK (search_mode_text), sdlg);
g_signal_connect (sdlg->priv->hex_mode, "toggled", G_CALLBACK (search_mode_hex), sdlg);
@@ -310,9 +310,9 @@ static void search_dlg_init (GViewerSearchDlg *sdlg)
static void search_dlg_destroy (GtkObject *object)
{
- g_return_if_fail (IS_GVIEWER_SEARCH_DLG(object));
+ g_return_if_fail (IS_GVIEWER_SEARCH_DLG (object));
- GViewerSearchDlg *w = GVIEWER_SEARCH_DLG(object);
+ GViewerSearchDlg *w = GVIEWER_SEARCH_DLG (object);
if (w->priv)
{
diff --git a/src/intviewer/search-progress-dlg.cc b/src/intviewer/search-progress-dlg.cc
index 4f9b504..d6ba45b 100644
--- a/src/intviewer/search-progress-dlg.cc
+++ b/src/intviewer/search-progress-dlg.cc
@@ -85,8 +85,8 @@ static void search_progress_dlg_init (GViewerSearchProgressDlg *sdlg)
// Progress Bar
sdlg->priv->progressbar = gtk_progress_bar_new();
- gtk_progress_bar_set_text(GTK_PROGRESS_BAR(sdlg->priv->progressbar), "0.0");
- gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(sdlg->priv->progressbar), 0.0);
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR (sdlg->priv->progressbar), "0.0");
+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR (sdlg->priv->progressbar), 0.0);
gtk_box_pack_start(GTK_BOX(dlg->vbox), sdlg->priv->progressbar, TRUE, TRUE, 0);
@@ -98,9 +98,9 @@ static void search_progress_dlg_init (GViewerSearchProgressDlg *sdlg)
static void search_progress_dlg_destroy (GtkObject *object)
{
- g_return_if_fail (IS_GVIEWER_SEARCH_PROGRESS_DLG(object));
+ g_return_if_fail (IS_GVIEWER_SEARCH_PROGRESS_DLG (object));
- GViewerSearchProgressDlg *w = GVIEWER_SEARCH_PROGRESS_DLG(object);
+ GViewerSearchProgressDlg *w = GVIEWER_SEARCH_PROGRESS_DLG (object);
g_free (w->priv);
w->priv = NULL;
@@ -145,18 +145,18 @@ GtkWidget *gviewer_search_progress_dlg_new (GtkWindow *parent)
gboolean search_progress_dlg_timeout(gpointer data)
{
- g_return_val_if_fail (IS_GVIEWER_SEARCH_PROGRESS_DLG(data), FALSE);
+ g_return_val_if_fail (IS_GVIEWER_SEARCH_PROGRESS_DLG (data), FALSE);
gdouble progress;
gchar text[20];
- GViewerSearchProgressDlg *w = GVIEWER_SEARCH_PROGRESS_DLG(data);
+ GViewerSearchProgressDlg *w = GVIEWER_SEARCH_PROGRESS_DLG (data);
progress = g_atomic_int_get (w->priv->progress_value);
g_snprintf(text, sizeof(text), "%3.1f%%", progress/10.0);
- gtk_progress_bar_set_text(GTK_PROGRESS_BAR(w->priv->progressbar), text);
- gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(w->priv->progressbar), progress/1000.0);
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR (w->priv->progressbar), text);
+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR (w->priv->progressbar), progress/1000.0);
if (g_atomic_int_get (w->priv->completed_indicator)!=0)
{
@@ -180,10 +180,10 @@ void gviewer_show_search_progress_dlg(GtkWindow *parent, const gchar *searching_
gchar text[20];
GtkWidget *w = gviewer_search_progress_dlg_new(parent);
- GViewerSearchProgressDlg *dlg = GVIEWER_SEARCH_PROGRESS_DLG(w);
+ GViewerSearchProgressDlg *dlg = GVIEWER_SEARCH_PROGRESS_DLG (w);
- gchar *str = g_strdup_printf(_("Searching for \"%s\""), searching_text);
- gtk_label_set_text(GTK_LABEL(dlg->priv->label), str);
+ gchar *str = g_strdup_printf (_("Searching for \"%s\""), searching_text);
+ gtk_label_set_text (GTK_LABEL (dlg->priv->label), str);
dlg->priv->abort_indicator = abort;
dlg->priv->progress_value = progress;
@@ -193,8 +193,8 @@ void gviewer_show_search_progress_dlg(GtkWindow *parent, const gchar *searching_
dprogress = g_atomic_int_get (dlg->priv->progress_value);
g_snprintf(text, sizeof(text), "%3.1f%%", dprogress/10.0);
- gtk_progress_bar_set_text(GTK_PROGRESS_BAR(dlg->priv->progressbar), text);
- gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(dlg->priv->progressbar), dprogress/1000.0);
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR (dlg->priv->progressbar), text);
+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR (dlg->priv->progressbar), dprogress/1000.0);
gtk_dialog_run(GTK_DIALOG(dlg));
diff --git a/src/intviewer/viewer-window.cc b/src/intviewer/viewer-window.cc
index 0666137..3b3ed40 100644
--- a/src/intviewer/viewer-window.cc
+++ b/src/intviewer/viewer-window.cc
@@ -150,10 +150,10 @@ GtkWidget *gviewer_window_file_view (GnomeCmdFile *f, GViewerWindowSettings *ini
GtkWidget *w = gviewer_window_new ();
- gviewer_window_load_file (GVIEWER_WINDOW(w), f);
+ gviewer_window_load_file (GVIEWER_WINDOW (w), f);
if (initial_settings)
- gviewer_window_set_settings(GVIEWER_WINDOW(w), initial_settings);
+ gviewer_window_set_settings(GVIEWER_WINDOW (w), initial_settings);
return w;
}
@@ -170,7 +170,7 @@ void gviewer_window_load_file (GViewerWindow *obj, GnomeCmdFile *f)
obj->priv->filename = f->get_real_path();
gviewer_load_file (obj->priv->viewer, obj->priv->filename);
- gtk_window_set_title (GTK_WINDOW(obj), obj->priv->filename);
+ gtk_window_set_title (GTK_WINDOW (obj), obj->priv->filename);
}
@@ -275,7 +275,7 @@ static void gviewer_window_status_line_changed(GViewer *obj, const gchar *status
void gviewer_window_set_settings(GViewerWindow *obj, /*in*/ GViewerWindowSettings *settings)
{
- g_return_if_fail (IS_GVIEWER_WINDOW(obj));
+ g_return_if_fail (IS_GVIEWER_WINDOW (obj));
g_return_if_fail (settings!=NULL);
g_return_if_fail (obj->priv->viewer!=NULL);
@@ -322,7 +322,7 @@ void gviewer_window_set_settings(GViewerWindow *obj, /*in*/ GViewerWindowSetting
void gviewer_window_get_current_settings(GViewerWindow *obj, /* out */ GViewerWindowSettings *settings)
{
- g_return_if_fail (IS_GVIEWER_WINDOW(obj));
+ g_return_if_fail (IS_GVIEWER_WINDOW (obj));
g_return_if_fail (settings!=NULL);
g_return_if_fail (obj->priv->viewer!=NULL);
@@ -1246,15 +1246,15 @@ void gviewer_window_load_settings(/* out */ GViewerWindowSettings *settings)
{
g_return_if_fail (settings!=NULL);
- gchar *temp = gviewer_get_string(GVIEWER_DEFAULT_PATH_PREFIX "charset", "ASCII");
+ gchar *temp = gviewer_get_string (GVIEWER_DEFAULT_PATH_PREFIX "charset", "ASCII");
strncpy(settings->charset, temp, sizeof(settings->charset));
g_free (temp);
- temp = gviewer_get_string(GVIEWER_DEFAULT_PATH_PREFIX "fixed_font_name", "Monospace");
+ temp = gviewer_get_string (GVIEWER_DEFAULT_PATH_PREFIX "fixed_font_name", "Monospace");
strncpy(settings->fixed_font_name, temp, sizeof(settings->fixed_font_name));
g_free (temp);
- temp = gviewer_get_string(GVIEWER_DEFAULT_PATH_PREFIX "variable_font_name", "Sans");
+ temp = gviewer_get_string (GVIEWER_DEFAULT_PATH_PREFIX "variable_font_name", "Sans");
strncpy(settings->variable_font_name, temp, sizeof(settings->variable_font_name));
g_free (temp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]