[file-roller] fixed indentation and spacing
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] fixed indentation and spacing
- Date: Sun, 15 Feb 2015 12:00:30 +0000 (UTC)
commit 140bbb8149ba2a6834aed9acb6cc4b3abbbb926f
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Feb 15 12:51:25 2015 +0100
fixed indentation and spacing
src/dlg-add.c | 16 ++++++++--------
src/dlg-ask-password.c | 23 ++++++++++++-----------
src/dlg-delete.c | 28 +++++++++++++---------------
src/dlg-password.c | 26 +++++++++++++-------------
src/dlg-prop.c | 15 +++++++--------
src/fr-file-selector-dialog.c | 5 +++--
src/fr-new-archive-dialog.c | 6 +++---
src/gtk-utils.c | 14 +++++++-------
8 files changed, 66 insertions(+), 67 deletions(-)
---
diff --git a/src/dlg-add.c b/src/dlg-add.c
index a4cbf2e..ec01f51 100644
--- a/src/dlg-add.c
+++ b/src/dlg-add.c
@@ -173,7 +173,7 @@ dlg_add (FrWindow *window)
GtkWidget *options_button;
GtkWidget *options_menu;
GtkWidget *menu_item;
- gboolean use_header;
+ gboolean use_header;
data = g_new0 (DialogData, 1);
data->settings = g_settings_new (FILE_ROLLER_SCHEMA_ADD);
@@ -222,12 +222,12 @@ dlg_add (FrWindow *window)
/* add the buttons */
- if (!use_header)
+ if (! use_header)
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (data->dialog))),
- options_button,
- FALSE,
- FALSE,
- 0);
+ options_button,
+ FALSE,
+ FALSE,
+ 0);
gtk_dialog_add_button (GTK_DIALOG (data->dialog),
_GTK_LABEL_CANCEL,
@@ -237,8 +237,8 @@ dlg_add (FrWindow *window)
GTK_RESPONSE_OK);
if (use_header)
- gtk_header_bar_pack_end (GTK_HEADER_BAR (gtk_dialog_get_header_bar (
- GTK_DIALOG (data->dialog))), options_button);
+ gtk_header_bar_pack_end (GTK_HEADER_BAR (gtk_dialog_get_header_bar (GTK_DIALOG
(data->dialog))),
+ options_button);
/* set data */
diff --git a/src/dlg-ask-password.c b/src/dlg-ask-password.c
index 5a80238..58db714 100644
--- a/src/dlg-ask-password.c
+++ b/src/dlg-ask-password.c
@@ -114,24 +114,25 @@ dlg_ask_password__common (FrWindow *window,
data->pwd_type = pwd_type;
/* Make the widgets. */
+
g_object_get (gtk_settings_get_default (),
- "gtk-dialogs-use-header", &use_header,
- NULL);
+ "gtk-dialogs-use-header", &use_header,
+ NULL);
data->dialog = g_object_new (GTK_TYPE_DIALOG,
- "transient-for", GTK_WINDOW (window),
- "modal", TRUE,
- "use-header-bar", use_header,
- NULL);
+ "transient-for", GTK_WINDOW (window),
+ "modal", TRUE,
+ "use-header-bar", use_header,
+ NULL);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (data->dialog));
gtk_container_add (GTK_CONTAINER (content_area),
- GET_WIDGET ("password_vbox"));
+ GET_WIDGET ("password_vbox"));
gtk_dialog_add_buttons (GTK_DIALOG (data->dialog),
- _("_Cancel"), GTK_RESPONSE_CANCEL,
- _("_OK"), GTK_RESPONSE_OK,
- NULL);
+ _GTK_LABEL_CANCEL, GTK_RESPONSE_CANCEL,
+ _("_OK"), GTK_RESPONSE_OK,
+ NULL);
gtk_dialog_set_default_response (GTK_DIALOG (data->dialog),
- GTK_RESPONSE_OK);
+ GTK_RESPONSE_OK);
data->password_entry = GET_WIDGET ("password_entry");
/* Set widgets data. */
diff --git a/src/dlg-delete.c b/src/dlg-delete.c
index c5e6d4b..b19d52d 100644
--- a/src/dlg-delete.c
+++ b/src/dlg-delete.c
@@ -112,7 +112,7 @@ dlg_delete__common (FrWindow *window,
GtkWidget *content_area;
GtkWidget *delete_box;
GtkWidget *ok_button;
- gboolean use_header;
+ gboolean use_header;
data = g_new (DialogData, 1);
data->window = window;
@@ -126,24 +126,22 @@ dlg_delete__common (FrWindow *window,
/* Get the widgets. */
g_object_get (gtk_settings_get_default (),
- "gtk-dialogs-use-header", &use_header,
- NULL);
+ "gtk-dialogs-use-header", &use_header,
+ NULL);
data->dialog = g_object_new (GTK_TYPE_DIALOG,
- "transient-for", GTK_WINDOW (window),
- "modal", TRUE,
- "use-header-bar", use_header,
- NULL);
+ "transient-for", GTK_WINDOW (window),
+ "modal", TRUE,
+ "use-header-bar", use_header,
+ NULL);
gtk_dialog_add_buttons (GTK_DIALOG (data->dialog),
- _("_Cancel"), GTK_RESPONSE_CANCEL,
- _("_Delete"), GTK_RESPONSE_OK,
- NULL);
-
- ok_button = gtk_dialog_get_widget_for_response (GTK_DIALOG (data->dialog),
- GTK_RESPONSE_OK);
- gtk_style_context_add_class (gtk_widget_get_style_context (ok_button),
- "destructive-action");
+ _GTK_LABEL_CANCEL, GTK_RESPONSE_CANCEL,
+ _("_Delete"), GTK_RESPONSE_OK,
+ NULL);
+
+ ok_button = gtk_dialog_get_widget_for_response (GTK_DIALOG (data->dialog), GTK_RESPONSE_OK);
+ gtk_style_context_add_class (gtk_widget_get_style_context (ok_button), "destructive-action");
delete_box = _gtk_builder_get_widget (data->builder, "delete_box");
diff --git a/src/dlg-password.c b/src/dlg-password.c
index fbe3b58..360cd31 100644
--- a/src/dlg-password.c
+++ b/src/dlg-password.c
@@ -78,7 +78,7 @@ dlg_password (GtkWidget *widget,
GtkWidget *content_area;
char *basename;
char *title;
- gboolean use_header;
+ gboolean use_header;
data = g_new0 (DialogData, 1);
data->window = window;
@@ -89,24 +89,24 @@ dlg_password (GtkWidget *widget,
}
/* Set widgets data. */
+
g_object_get (gtk_settings_get_default (),
- "gtk-dialogs-use-header", &use_header,
- NULL);
+ "gtk-dialogs-use-header", &use_header,
+ NULL);
data->dialog = g_object_new (GTK_TYPE_DIALOG,
- "transient-for", GTK_WINDOW (window),
- "modal", TRUE,
- "use-header-bar", use_header,
- NULL);
+ "transient-for", GTK_WINDOW (window),
+ "modal", TRUE,
+ "use-header-bar", use_header,
+ NULL);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (data->dialog));
gtk_container_add (GTK_CONTAINER (content_area),
- GET_WIDGET ("password_vbox"));
+ GET_WIDGET ("password_vbox"));
gtk_dialog_add_buttons (GTK_DIALOG (data->dialog),
- _("_Cancel"), GTK_RESPONSE_CANCEL,
- _("_Save"), GTK_RESPONSE_OK,
- NULL);
- gtk_dialog_set_default_response (GTK_DIALOG (data->dialog),
- GTK_RESPONSE_OK);
+ _GTK_LABEL_CANCEL, GTK_RESPONSE_CANCEL,
+ _GTK_LABEL_SAVE, GTK_RESPONSE_OK,
+ NULL);
+ gtk_dialog_set_default_response (GTK_DIALOG (data->dialog), GTK_RESPONSE_OK);
basename = _g_file_get_display_basename (fr_archive_get_file (window->archive));
title = g_strdup_printf (_("Enter a password for \"%s\""), basename);
diff --git a/src/dlg-prop.c b/src/dlg-prop.c
index 4d2b2e5..31ff6a1 100644
--- a/src/dlg-prop.c
+++ b/src/dlg-prop.c
@@ -60,7 +60,7 @@ dlg_prop (FrWindow *window)
char *utf8_name;
char *title_txt;
double ratio;
- gboolean use_header;
+ gboolean use_header;
data = g_new (DialogData, 1);
@@ -76,19 +76,18 @@ dlg_prop (FrWindow *window)
/* Make the dialog */
g_object_get (gtk_settings_get_default (),
- "gtk-dialogs-use-header", &use_header,
- NULL);
+ "gtk-dialogs-use-header", &use_header,
+ NULL);
data->dialog = gtk_widget_new (GTK_TYPE_DIALOG,
- "transient-for", GTK_WINDOW (window),
- "modal", TRUE,
- "use-header-bar", use_header,
- NULL);
+ "transient-for", GTK_WINDOW (window),
+ "modal", TRUE,
+ "use-header-bar", use_header,
+ NULL);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (data->dialog));
gtk_container_add (GTK_CONTAINER (content_area), table);
-
/* Set widgets data. */
label = _gtk_builder_get_widget (data->builder, "p_path_label");
diff --git a/src/fr-file-selector-dialog.c b/src/fr-file-selector-dialog.c
index fab17b9..38f7425 100644
--- a/src/fr-file-selector-dialog.c
+++ b/src/fr-file-selector-dialog.c
@@ -713,9 +713,10 @@ fr_file_selector_dialog_new (const char *title,
GtkWindow *parent)
{
gboolean use_header;
+
g_object_get (gtk_settings_get_default (),
- "gtk-dialogs-use-header", &use_header,
- NULL);
+ "gtk-dialogs-use-header", &use_header,
+ NULL);
return (GtkWidget *) g_object_new (FR_TYPE_FILE_SELECTOR_DIALOG,
"title", title,
diff --git a/src/fr-new-archive-dialog.c b/src/fr-new-archive-dialog.c
index 84acb35..afe0e1f 100644
--- a/src/fr-new-archive-dialog.c
+++ b/src/fr-new-archive-dialog.c
@@ -309,11 +309,11 @@ fr_new_archive_dialog_new (const char *title,
GFile *original_file)
{
FrNewArchiveDialog *self;
- gboolean use_header;
+ gboolean use_header;
g_object_get (gtk_settings_get_default (),
- "gtk-dialogs-use-header", &use_header,
- NULL);
+ "gtk-dialogs-use-header", &use_header,
+ NULL);
self = g_object_new (FR_TYPE_NEW_ARCHIVE_DIALOG, "title", title, "use-header-bar", use_header, NULL);
_fr_new_archive_dialog_construct (self, parent, action, folder, default_name, original_file);
diff --git a/src/gtk-utils.c b/src/gtk-utils.c
index 78a5d2a..5de4e63 100644
--- a/src/gtk-utils.c
+++ b/src/gtk-utils.c
@@ -130,20 +130,20 @@ _gtk_request_dialog_run (GtkWindow *parent,
GtkWidget *content_area;
GtkWidget *request_box;
char *result;
- gboolean use_header;
+ gboolean use_header;
g_object_get (gtk_settings_get_default (),
- "gtk-dialogs-use-header", &use_header,
- NULL);
+ "gtk-dialogs-use-header", &use_header,
+ NULL);
builder = _gtk_builder_new_from_resource ("request-dialog.ui");
request_box = _gtk_builder_get_widget (builder, "request_box");
dialog = g_object_new (GTK_TYPE_DIALOG,
- "transient-for", parent,
- "modal", flags & GTK_DIALOG_MODAL,
- "use-header-bar", use_header,
- NULL);
+ "transient-for", parent,
+ "modal", flags & GTK_DIALOG_MODAL,
+ "use-header-bar", use_header,
+ NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), (flags & GTK_DIALOG_DESTROY_WITH_PARENT));
gtk_window_set_title (GTK_WINDOW (dialog), title);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]