aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/menus
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-11 23:50:51 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-12 02:14:04 +0800
commitebcce86769d174cce6e881740c5e9bcedce28e06 (patch)
treeb2cc2d18ceb0c3bd3e78f5b768c1b6926b69bb4a /widgets/menus
parent1e3deb31476cf0026011876327be83e9a47847ee (diff)
downloadgsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar
gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.gz
gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.bz2
gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.lz
gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.xz
gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.zst
gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.zip
Coding style and whitespace cleanups.
Diffstat (limited to 'widgets/menus')
-rw-r--r--widgets/menus/gal-define-views-dialog.c22
-rw-r--r--widgets/menus/gal-define-views-dialog.h2
-rw-r--r--widgets/menus/gal-define-views-model.c159
-rw-r--r--widgets/menus/gal-view-collection.c162
-rw-r--r--widgets/menus/gal-view-etable.c64
-rw-r--r--widgets/menus/gal-view-factory-etable.h2
-rw-r--r--widgets/menus/gal-view-instance.c44
-rw-r--r--widgets/menus/gal-view-new-dialog.c24
-rw-r--r--widgets/menus/gal-view.c2
9 files changed, 241 insertions, 240 deletions
diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c
index a6f52bf69a..66b055dca6 100644
--- a/widgets/menus/gal-define-views-dialog.c
+++ b/widgets/menus/gal-define-views-dialog.c
@@ -96,10 +96,10 @@ gdvd_button_new_dialog_callback (GtkWidget *widget, gint id, GalDefineViewsDialo
NULL);
if (name && factory) {
- g_strchomp(name);
+ g_strchomp (name);
if (*name != '\0') {
view = gal_view_factory_new_view (factory, name);
- gal_view_collection_append(dialog->collection, view);
+ gal_view_collection_append (dialog->collection, view);
item = dialog->collection->view_data[dialog->collection->view_count-1];
gtk_list_store_append (GTK_LIST_STORE (dialog->model), &iter);
@@ -121,7 +121,7 @@ gdvd_button_new_dialog_callback (GtkWidget *widget, gint id, GalDefineViewsDialo
}
static void
-gdvd_button_new_callback(GtkWidget *widget, GalDefineViewsDialog *dialog)
+gdvd_button_new_callback (GtkWidget *widget, GalDefineViewsDialog *dialog)
{
GtkWidget *view_new_dialog = gal_view_new_dialog_new (dialog->collection);
gtk_window_set_transient_for (GTK_WINDOW (view_new_dialog), GTK_WINDOW (dialog));
@@ -131,7 +131,7 @@ gdvd_button_new_callback(GtkWidget *widget, GalDefineViewsDialog *dialog)
}
static void
-gdvd_button_modify_callback(GtkWidget *widget, GalDefineViewsDialog *dialog)
+gdvd_button_modify_callback (GtkWidget *widget, GalDefineViewsDialog *dialog)
{
GtkTreeIter iter;
GalViewCollectionItem *item;
@@ -148,7 +148,7 @@ gdvd_button_modify_callback(GtkWidget *widget, GalDefineViewsDialog *dialog)
}
static void
-gdvd_button_delete_callback(GtkWidget *widget, GalDefineViewsDialog *dialog)
+gdvd_button_delete_callback (GtkWidget *widget, GalDefineViewsDialog *dialog)
{
gint row;
GtkTreeIter iter;
@@ -207,7 +207,7 @@ gdvd_selection_changed_callback (GtkTreeSelection *selection, GalDefineViewsDial
}
static void
-gdvd_connect_signal(GalDefineViewsDialog *dialog, const gchar *widget_name, const gchar *signal, GCallback handler)
+gdvd_connect_signal (GalDefineViewsDialog *dialog, const gchar *widget_name, const gchar *signal, GCallback handler)
{
GtkWidget *widget;
@@ -279,10 +279,10 @@ gal_define_views_dialog_init (GalDefineViewsDialog *dialog)
static void
gal_define_views_dialog_dispose (GObject *object)
{
- GalDefineViewsDialog *gal_define_views_dialog = GAL_DEFINE_VIEWS_DIALOG(object);
+ GalDefineViewsDialog *gal_define_views_dialog = GAL_DEFINE_VIEWS_DIALOG (object);
if (gal_define_views_dialog->builder)
- g_object_unref(gal_define_views_dialog->builder);
+ g_object_unref (gal_define_views_dialog->builder);
gal_define_views_dialog->builder = NULL;
if (G_OBJECT_CLASS (gal_define_views_dialog_parent_class)->dispose)
@@ -290,7 +290,7 @@ gal_define_views_dialog_dispose (GObject *object)
}
static void
-gal_define_views_dialog_set_collection(GalDefineViewsDialog *dialog,
+gal_define_views_dialog_set_collection (GalDefineViewsDialog *dialog,
GalViewCollection *collection)
{
gint i;
@@ -384,9 +384,9 @@ gal_define_views_dialog_set_property (GObject *object, guint prop_id, const GVal
switch (prop_id) {
case PROP_COLLECTION:
if (g_value_get_object (value))
- gal_define_views_dialog_set_collection(dialog, GAL_VIEW_COLLECTION(g_value_get_object (value)));
+ gal_define_views_dialog_set_collection (dialog, GAL_VIEW_COLLECTION (g_value_get_object (value)));
else
- gal_define_views_dialog_set_collection(dialog, NULL);
+ gal_define_views_dialog_set_collection (dialog, NULL);
break;
default:
diff --git a/widgets/menus/gal-define-views-dialog.h b/widgets/menus/gal-define-views-dialog.h
index da214af36a..feb349e2d3 100644
--- a/widgets/menus/gal-define-views-dialog.h
+++ b/widgets/menus/gal-define-views-dialog.h
@@ -65,7 +65,7 @@ struct _GalDefineViewsDialogClass {
GtkDialogClass parent_class;
};
-GType gal_define_views_dialog_get_type(void);
+GType gal_define_views_dialog_get_type (void);
GtkWidget * gal_define_views_dialog_new (GalViewCollection *collection);
G_END_DECLS
diff --git a/widgets/menus/gal-define-views-model.c b/widgets/menus/gal-define-views-model.c
index 35a18a2484..2274fd8c78 100644
--- a/widgets/menus/gal-define-views-model.c
+++ b/widgets/menus/gal-define-views-model.c
@@ -33,13 +33,6 @@
G_DEFINE_TYPE (GalDefineViewsModel, gal_define_views_model, E_TABLE_MODEL_TYPE)
-/*
- * GalDefineViewsModel callbacks
- * These are the callbacks that define the behavior of our custom model.
- */
-static void gal_define_views_model_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void gal_define_views_model_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-
enum {
PROP_0,
PROP_EDITABLE,
@@ -47,12 +40,64 @@ enum {
};
static void
-gdvm_dispose(GObject *object)
+gal_define_views_model_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GalDefineViewsModel *model;
+
+ model = GAL_DEFINE_VIEWS_MODEL (object);
+
+ switch (property_id) {
+ case PROP_EDITABLE:
+ model->editable = g_value_get_boolean (value);
+ return;
+
+ case PROP_COLLECTION:
+ e_table_model_pre_change (E_TABLE_MODEL (object));
+ if (g_value_get_object (value))
+ model->collection = GAL_VIEW_COLLECTION (
+ g_value_get_object (value));
+ else
+ model->collection = NULL;
+ e_table_model_changed (E_TABLE_MODEL (object));
+ return;
+ }
+
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
+gal_define_views_model_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GalDefineViewsModel *model;
+
+ model = GAL_DEFINE_VIEWS_MODEL (object);
+
+ switch (property_id) {
+ case PROP_EDITABLE:
+ g_value_set_boolean (value, model->editable);
+ return;
+
+ case PROP_COLLECTION:
+ g_value_set_object (value, model->collection);
+ return;
+ }
+
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
+gdvm_dispose (GObject *object)
{
- GalDefineViewsModel *model = GAL_DEFINE_VIEWS_MODEL(object);
+ GalDefineViewsModel *model = GAL_DEFINE_VIEWS_MODEL (object);
if (model->collection)
- g_object_unref(model->collection);
+ g_object_unref (model->collection);
model->collection = NULL;
if (G_OBJECT_CLASS (gal_define_views_model_parent_class)->dispose)
@@ -70,9 +115,9 @@ gdvm_col_count (ETableModel *etc)
static gint
gdvm_row_count (ETableModel *etc)
{
- GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL(etc);
+ GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL (etc);
if (views->collection)
- return gal_view_collection_get_count(views->collection);
+ return gal_view_collection_get_count (views->collection);
else
return 0;
}
@@ -81,10 +126,10 @@ gdvm_row_count (ETableModel *etc)
static gpointer
gdvm_value_at (ETableModel *etc, gint col, gint row)
{
- GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL(etc);
+ GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL (etc);
const gchar *value;
- value = gal_view_get_title (gal_view_collection_get_view(views->collection, row));
+ value = gal_view_get_title (gal_view_collection_get_view (views->collection, row));
return (gpointer)(value ? value : "");
}
@@ -93,11 +138,11 @@ gdvm_value_at (ETableModel *etc, gint col, gint row)
static void
gdvm_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val)
{
- GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL(etc);
+ GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL (etc);
if (views->editable) {
- e_table_model_pre_change(etc);
- gal_view_set_title(gal_view_collection_get_view(views->collection, row), val);
- e_table_model_cell_changed(etc, col, row);
+ e_table_model_pre_change (etc);
+ gal_view_set_title (gal_view_collection_get_view (views->collection, row), val);
+ e_table_model_cell_changed (etc, col, row);
}
}
@@ -105,7 +150,7 @@ gdvm_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val)
static gboolean
gdvm_is_cell_editable (ETableModel *etc, gint col, gint row)
{
- return GAL_DEFINE_VIEWS_MODEL(etc)->editable;
+ return GAL_DEFINE_VIEWS_MODEL (etc)->editable;
}
static void
@@ -117,14 +162,14 @@ gdvm_append_row (ETableModel *etm, ETableModel *source, gint row)
static gpointer
gdvm_duplicate_value (ETableModel *etc, gint col, gconstpointer value)
{
- return g_strdup(value);
+ return g_strdup (value);
}
/* This function frees the value passed to it. */
static void
gdvm_free_value (ETableModel *etc, gint col, gpointer value)
{
- g_free(value);
+ g_free (value);
}
static gpointer
@@ -142,7 +187,7 @@ gdvm_value_is_empty (ETableModel *etc, gint col, gconstpointer value)
static gchar *
gdvm_value_to_string (ETableModel *etc, gint col, gconstpointer value)
{
- return g_strdup(value);
+ return g_strdup (value);
}
/**
@@ -156,11 +201,11 @@ void
gal_define_views_model_append (GalDefineViewsModel *model,
GalView *view)
{
- ETableModel *etm = E_TABLE_MODEL(model);
+ ETableModel *etm = E_TABLE_MODEL (model);
- e_table_model_pre_change(etm);
- gal_view_collection_append(model->collection, view);
- e_table_model_row_inserted(etm, gal_view_collection_get_count(model->collection) - 1);
+ e_table_model_pre_change (etm);
+ gal_view_collection_append (model->collection, view);
+ e_table_model_row_inserted (etm, gal_view_collection_get_count (model->collection) - 1);
}
static void
@@ -206,50 +251,6 @@ gal_define_views_model_init (GalDefineViewsModel *model)
model->collection = NULL;
}
-static void
-gal_define_views_model_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- GalDefineViewsModel *model;
-
- model = GAL_DEFINE_VIEWS_MODEL (object);
-
- switch (prop_id) {
- case PROP_EDITABLE:
- model->editable = g_value_get_boolean (value);
- break;
-
- case PROP_COLLECTION:
- e_table_model_pre_change(E_TABLE_MODEL(object));
- if (g_value_get_object (value))
- model->collection = GAL_VIEW_COLLECTION(g_value_get_object (value));
- else
- model->collection = NULL;
- e_table_model_changed(E_TABLE_MODEL(object));
- break;
- }
-}
-
-static void
-gal_define_views_model_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- GalDefineViewsModel *model;
-
- model = GAL_DEFINE_VIEWS_MODEL (object);
-
- switch (prop_id) {
- case PROP_EDITABLE:
- g_value_set_boolean (value, model->editable);
- break;
-
- case PROP_COLLECTION:
- g_value_set_object (value, model->collection);
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
/**
* gal_define_views_model_new
*
@@ -265,7 +266,7 @@ gal_define_views_model_new (void)
et = g_object_new (GAL_DEFINE_VIEWS_MODEL_TYPE, NULL);
- return E_TABLE_MODEL(et);
+ return E_TABLE_MODEL (et);
}
/**
@@ -281,7 +282,7 @@ GalView *
gal_define_views_model_get_view (GalDefineViewsModel *model,
gint n)
{
- return gal_view_collection_get_view(model->collection, n);
+ return gal_view_collection_get_view (model->collection, n);
}
/**
@@ -295,9 +296,9 @@ void
gal_define_views_model_delete_view (GalDefineViewsModel *model,
gint n)
{
- e_table_model_pre_change(E_TABLE_MODEL(model));
- gal_view_collection_delete_view(model->collection, n);
- e_table_model_row_deleted(E_TABLE_MODEL(model), n);
+ e_table_model_pre_change (E_TABLE_MODEL (model));
+ gal_view_collection_delete_view (model->collection, n);
+ e_table_model_row_deleted (E_TABLE_MODEL (model), n);
}
/**
@@ -311,8 +312,8 @@ void
gal_define_views_model_copy_view (GalDefineViewsModel *model,
gint n)
{
- ETableModel *etm = E_TABLE_MODEL(model);
- e_table_model_pre_change(etm);
- gal_view_collection_copy_view(model->collection, n);
- e_table_model_row_inserted(etm, gal_view_collection_get_count(model->collection) - 1);
+ ETableModel *etm = E_TABLE_MODEL (model);
+ e_table_model_pre_change (etm);
+ gal_view_collection_copy_view (model->collection, n);
+ e_table_model_row_inserted (etm, gal_view_collection_get_count (model->collection) - 1);
}
diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c
index 296b634e28..56d8044680 100644
--- a/widgets/menus/gal-view-collection.c
+++ b/widgets/menus/gal-view-collection.c
@@ -47,7 +47,7 @@ enum {
LAST_SIGNAL
};
-static guint gal_view_collection_signals [LAST_SIGNAL] = { 0, };
+static guint gal_view_collection_signals[LAST_SIGNAL] = { 0, };
/**
* gal_view_collection_display_view:
@@ -65,7 +65,7 @@ gal_view_collection_display_view (GalViewCollection *collection,
g_return_if_fail (GAL_IS_VIEW (view));
g_signal_emit (collection,
- gal_view_collection_signals [DISPLAY_VIEW], 0,
+ gal_view_collection_signals[DISPLAY_VIEW], 0,
view);
}
@@ -76,20 +76,20 @@ gal_view_collection_changed (GalViewCollection *collection)
g_return_if_fail (GAL_IS_VIEW_COLLECTION (collection));
g_signal_emit (collection,
- gal_view_collection_signals [CHANGED], 0);
+ gal_view_collection_signals[CHANGED], 0);
}
static void
gal_view_collection_item_free (GalViewCollectionItem *item)
{
- g_free(item->id);
+ g_free (item->id);
if (item->view) {
if (item->view_changed_id)
g_signal_handler_disconnect (item->view,
item->view_changed_id);
- g_object_unref(item->view);
+ g_object_unref (item->view);
}
- g_free(item);
+ g_free (item);
}
static gchar *
@@ -101,13 +101,13 @@ gal_view_generate_string (GalViewCollection *collection,
gchar *pointer;
if (which == 1)
- ret_val = g_strdup(gal_view_get_title(view));
+ ret_val = g_strdup (gal_view_get_title (view));
else
ret_val = g_strdup_printf("%s_%d", gal_view_get_title(view), which);
- for (pointer = ret_val; *pointer; pointer = g_utf8_next_char(pointer)) {
- if (!g_unichar_isalnum(g_utf8_get_char(pointer))) {
+ for (pointer = ret_val; *pointer; pointer = g_utf8_next_char (pointer)) {
+ if (!g_unichar_isalnum (g_utf8_get_char (pointer))) {
gchar *ptr = pointer;
- for (; ptr < g_utf8_next_char(pointer); *ptr = '_', ptr++)
+ for (; ptr < g_utf8_next_char (pointer); *ptr = '_', ptr++)
;
}
}
@@ -124,11 +124,11 @@ gal_view_check_string (GalViewCollection *collection,
return FALSE;
for (i = 0; i < collection->view_count; i++) {
- if (!strcmp(string, collection->view_data[i]->id))
+ if (!strcmp (string, collection->view_data[i]->id))
return FALSE;
}
for (i = 0; i < collection->removed_view_count; i++) {
- if (!strcmp(string, collection->removed_view_data[i]->id))
+ if (!strcmp (string, collection->removed_view_data[i]->id))
return FALSE;
}
return TRUE;
@@ -142,17 +142,17 @@ gal_view_generate_id (GalViewCollection *collection,
for (i = 1; TRUE; i++) {
gchar *try;
- try = gal_view_generate_string(collection, view, i);
- if (gal_view_check_string(collection, try))
+ try = gal_view_generate_string (collection, view, i);
+ if (gal_view_check_string (collection, try))
return try;
- g_free(try);
+ g_free (try);
}
}
static void
gal_view_collection_dispose (GObject *object)
{
- GalViewCollection *collection = GAL_VIEW_COLLECTION(object);
+ GalViewCollection *collection = GAL_VIEW_COLLECTION (object);
gint i;
for (i = 0; i < collection->view_count; i++) {
@@ -171,14 +171,14 @@ gal_view_collection_dispose (GObject *object)
for (i = 0; i < collection->removed_view_count; i++) {
gal_view_collection_item_free (collection->removed_view_data[i]);
}
- g_free(collection->removed_view_data);
+ g_free (collection->removed_view_data);
collection->removed_view_data = NULL;
collection->removed_view_count = 0;
- g_free(collection->system_dir);
+ g_free (collection->system_dir);
collection->system_dir = NULL;
- g_free(collection->local_dir);
+ g_free (collection->local_dir);
collection->local_dir = NULL;
g_free (collection->default_view);
@@ -198,7 +198,7 @@ gal_view_collection_class_init (GalViewCollectionClass *klass)
object_class->dispose = gal_view_collection_dispose;
- gal_view_collection_signals [DISPLAY_VIEW] =
+ gal_view_collection_signals[DISPLAY_VIEW] =
g_signal_new ("display_view",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -207,7 +207,7 @@ gal_view_collection_class_init (GalViewCollectionClass *klass)
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, GAL_TYPE_VIEW);
- gal_view_collection_signals [CHANGED] =
+ gal_view_collection_signals[CHANGED] =
g_signal_new ("changed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -277,11 +277,11 @@ gal_view_collection_set_storage_directories (GalViewCollection *collection,
g_return_if_fail (system_dir != NULL);
g_return_if_fail (local_dir != NULL);
- g_free(collection->system_dir);
- g_free(collection->local_dir);
+ g_free (collection->system_dir);
+ g_free (collection->local_dir);
- collection->system_dir = g_strdup(system_dir);
- collection->local_dir = g_strdup(local_dir);
+ collection->system_dir = g_strdup (system_dir);
+ collection->local_dir = g_strdup (local_dir);
}
/**
@@ -315,9 +315,9 @@ view_changed (GalView *view,
item->changed = TRUE;
item->ever_changed = TRUE;
- g_signal_handler_block(G_OBJECT(item->view), item->view_changed_id);
- gal_view_collection_changed(item->collection);
- g_signal_handler_unblock(G_OBJECT(item->view), item->view_changed_id);
+ g_signal_handler_block (G_OBJECT (item->view), item->view_changed_id);
+ gal_view_collection_changed (item->collection);
+ g_signal_handler_unblock (G_OBJECT (item->view), item->view_changed_id);
}
/* Use factory list to load a GalView file. */
@@ -329,7 +329,7 @@ gal_view_collection_real_load_view_from_file (GalViewCollection *collection, con
factory = NULL;
for (factories = collection->factory_list; factories; factories = factories->next) {
- if (type && !strcmp(gal_view_factory_get_type_code(factories->data), type)) {
+ if (type && !strcmp (gal_view_factory_get_type_code (factories->data), type)) {
factory = factories->data;
break;
}
@@ -339,7 +339,7 @@ gal_view_collection_real_load_view_from_file (GalViewCollection *collection, con
view = gal_view_factory_new_view (factory, title);
gal_view_set_title (view, title);
- gal_view_load(view, filename);
+ gal_view_load (view, filename);
return view;
}
return NULL;
@@ -358,7 +358,7 @@ load_single_file (GalViewCollection *collection,
xmlNode *node)
{
GalViewCollectionItem *item;
- item = g_new(GalViewCollectionItem, 1);
+ item = g_new (GalViewCollectionItem, 1);
item->ever_changed = local;
item->changed = FALSE;
item->built_in = !local;
@@ -371,13 +371,13 @@ load_single_file (GalViewCollection *collection,
if (item->filename) {
gchar *fullpath;
- fullpath = g_build_filename(dir, item->filename, NULL);
+ fullpath = g_build_filename (dir, item->filename, NULL);
item->view = gal_view_collection_real_load_view_from_file (collection, item->type, item->title, dir, fullpath);
- g_free(fullpath);
+ g_free (fullpath);
if (item->view) {
item->view_changed_id =
g_signal_connect(item->view, "changed",
- G_CALLBACK(view_changed), item);
+ G_CALLBACK (view_changed), item);
}
}
return item;
@@ -409,7 +409,7 @@ load_single_dir (GalViewCollection *collection,
g_free (filename);
return;
}
- root = xmlDocGetRootElement(doc);
+ root = xmlDocGetRootElement (doc);
for (child = root->xmlChildrenNode; child; child = child->next) {
gchar *id;
gboolean found = FALSE;
@@ -420,7 +420,7 @@ load_single_dir (GalViewCollection *collection,
id = e_xml_get_string_prop_by_name(child, (const guchar *)"id");
for (i = 0; i < collection->view_count; i++) {
- if (!strcmp(id, collection->view_data[i]->id)) {
+ if (!strcmp (id, collection->view_data[i]->id)) {
if (!local)
collection->view_data[i]->built_in = TRUE;
found = TRUE;
@@ -429,7 +429,7 @@ load_single_dir (GalViewCollection *collection,
}
if (!found) {
for (i = 0; i < collection->removed_view_count; i++) {
- if (!strcmp(id, collection->removed_view_data[i]->id)) {
+ if (!strcmp (id, collection->removed_view_data[i]->id)) {
if (!local)
collection->removed_view_data[i]->built_in = TRUE;
found = TRUE;
@@ -441,16 +441,16 @@ load_single_dir (GalViewCollection *collection,
if (!found) {
GalViewCollectionItem *item = load_single_file (collection, dir, local, child);
if (item->filename && *item->filename) {
- collection->view_data = g_renew(GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
+ collection->view_data = g_renew (GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
collection->view_data[collection->view_count] = item;
collection->view_count++;
} else {
- collection->removed_view_data = g_renew(GalViewCollectionItem *, collection->removed_view_data, collection->removed_view_count + 1);
+ collection->removed_view_data = g_renew (GalViewCollectionItem *, collection->removed_view_data, collection->removed_view_count + 1);
collection->removed_view_data[collection->removed_view_count] = item;
collection->removed_view_count++;
}
}
- g_free(id);
+ g_free (id);
}
default_view = e_xml_get_string_prop_by_name (root, (const guchar *)"default-view");
@@ -463,8 +463,8 @@ load_single_dir (GalViewCollection *collection,
collection->default_view = default_view;
}
- g_free(filename);
- xmlFreeDoc(doc);
+ g_free (filename);
+ xmlFreeDoc (doc);
}
/**
@@ -487,9 +487,9 @@ gal_view_collection_load (GalViewCollection *collection)
if ((g_mkdir_with_parents (collection->local_dir, 0777) == -1) && (errno != EEXIST))
g_warning ("Unable to create dir %s: %s", collection->local_dir, g_strerror(errno));
- load_single_dir(collection, collection->local_dir, TRUE);
- load_single_dir(collection, collection->system_dir, FALSE);
- gal_view_collection_changed(collection);
+ load_single_dir (collection, collection->local_dir, TRUE);
+ load_single_dir (collection, collection->system_dir, FALSE);
+ gal_view_collection_changed (collection);
collection->loaded = TRUE;
}
@@ -516,7 +516,7 @@ gal_view_collection_save (GalViewCollection *collection)
doc = xmlNewDoc((const guchar *)"1.0");
root = xmlNewNode(NULL, (const guchar *)"GalViewCollection");
- xmlDocSetRootElement(doc, root);
+ xmlDocSetRootElement (doc, root);
if (collection->default_view && !collection->default_view_built_in) {
e_xml_set_string_prop_by_name(root, (const guchar *)"default-view", collection->default_view);
@@ -535,9 +535,9 @@ gal_view_collection_save (GalViewCollection *collection)
e_xml_set_string_prop_by_name(child, (const guchar *)"type", item->type);
if (item->changed) {
- filename = g_build_filename(collection->local_dir, item->filename, NULL);
- gal_view_save(item->view, filename);
- g_free(filename);
+ filename = g_build_filename (collection->local_dir, item->filename, NULL);
+ gal_view_save (item->view, filename);
+ g_free (filename);
}
}
}
@@ -555,8 +555,8 @@ gal_view_collection_save (GalViewCollection *collection)
filename = g_build_filename(collection->local_dir, "galview.xml", NULL);
if (e_xml_save_file (filename, doc) == -1)
g_warning ("Unable to save view to %s - %s", filename, g_strerror(errno));
- xmlFreeDoc(doc);
- g_free(filename);
+ xmlFreeDoc (doc);
+ g_free (filename);
}
/**
@@ -608,8 +608,8 @@ gal_view_collection_get_view_item (GalViewCollection *collection,
{
g_return_val_if_fail (collection != NULL, NULL);
g_return_val_if_fail (GAL_IS_VIEW_COLLECTION (collection), NULL);
- g_return_val_if_fail(n < collection->view_count, NULL);
- g_return_val_if_fail(n >= 0, NULL);
+ g_return_val_if_fail (n < collection->view_count, NULL);
+ g_return_val_if_fail (n >= 0, NULL);
return collection->view_data[n];
}
@@ -630,8 +630,8 @@ gal_view_collection_get_view_id_by_index (GalViewCollection *collection, gint n)
{
g_return_val_if_fail (collection != NULL, NULL);
g_return_val_if_fail (GAL_IS_VIEW_COLLECTION (collection), NULL);
- g_return_val_if_fail(n < collection->view_count, NULL);
- g_return_val_if_fail(n >= 0, NULL);
+ g_return_val_if_fail (n < collection->view_count, NULL);
+ g_return_val_if_fail (n >= 0, NULL);
return g_strdup (collection->view_data[n]->id);
}
@@ -647,27 +647,27 @@ gal_view_collection_append (GalViewCollection *collection,
g_return_if_fail (view != NULL);
g_return_if_fail (GAL_IS_VIEW (view));
- item = g_new(GalViewCollectionItem, 1);
+ item = g_new (GalViewCollectionItem, 1);
item->ever_changed = TRUE;
item->changed = TRUE;
item->built_in = FALSE;
- item->title = g_strdup(gal_view_get_title(view));
- item->type = g_strdup(gal_view_get_type_code(view));
- item->id = gal_view_generate_id(collection, view);
+ item->title = g_strdup (gal_view_get_title (view));
+ item->type = g_strdup (gal_view_get_type_code (view));
+ item->id = gal_view_generate_id (collection, view);
item->filename = g_strdup_printf("%s.galview", item->id);
item->view = view;
item->collection = collection;
- g_object_ref(view);
+ g_object_ref (view);
item->view_changed_id =
g_signal_connect(item->view, "changed",
G_CALLBACK (view_changed), item);
- collection->view_data = g_renew(GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
+ collection->view_data = g_renew (GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
collection->view_data[collection->view_count] = item;
collection->view_count++;
- gal_view_collection_changed(collection);
+ gal_view_collection_changed (collection);
}
void
@@ -681,20 +681,20 @@ gal_view_collection_delete_view (GalViewCollection *collection,
g_return_if_fail (i >= 0 && i < collection->view_count);
item = collection->view_data[i];
- memmove(collection->view_data + i, collection->view_data + i + 1, (collection->view_count - i - 1) * sizeof(GalViewCollectionItem *));
+ memmove (collection->view_data + i, collection->view_data + i + 1, (collection->view_count - i - 1) * sizeof (GalViewCollectionItem *));
collection->view_count--;
if (item->built_in) {
- g_free(item->filename);
+ g_free (item->filename);
item->filename = NULL;
- collection->removed_view_data = g_renew(GalViewCollectionItem *, collection->removed_view_data, collection->removed_view_count + 1);
+ collection->removed_view_data = g_renew (GalViewCollectionItem *, collection->removed_view_data, collection->removed_view_count + 1);
collection->removed_view_data[collection->removed_view_count] = item;
collection->removed_view_count++;
} else {
gal_view_collection_item_free (item);
}
- gal_view_collection_changed(collection);
+ gal_view_collection_changed (collection);
}
void
@@ -710,26 +710,26 @@ gal_view_collection_copy_view (GalViewCollection *collection,
view = collection->view_data[i]->view;
- item = g_new(GalViewCollectionItem, 1);
+ item = g_new (GalViewCollectionItem, 1);
item->ever_changed = TRUE;
item->changed = FALSE;
item->built_in = FALSE;
- item->title = g_strdup(gal_view_get_title(view));
- item->type = g_strdup(gal_view_get_type_code(view));
- item->id = gal_view_generate_id(collection, view);
+ item->title = g_strdup (gal_view_get_title (view));
+ item->type = g_strdup (gal_view_get_type_code (view));
+ item->id = gal_view_generate_id (collection, view);
item->filename = g_strdup_printf("%s.galview", item->id);
- item->view = gal_view_clone(view);
+ item->view = gal_view_clone (view);
item->collection = collection;
item->view_changed_id =
g_signal_connect(item->view, "changed",
G_CALLBACK (view_changed), item);
- collection->view_data = g_renew(GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
+ collection->view_data = g_renew (GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
collection->view_data[collection->view_count] = item;
collection->view_count++;
- gal_view_collection_changed(collection);
+ gal_view_collection_changed (collection);
}
gboolean
@@ -752,27 +752,27 @@ gal_view_collection_append_with_title (GalViewCollection *collection, const gcha
d(g_print("%s: %p\n", G_STRFUNC, view));
- item = g_new(GalViewCollectionItem, 1);
+ item = g_new (GalViewCollectionItem, 1);
item->ever_changed = TRUE;
item->changed = TRUE;
item->built_in = FALSE;
- item->title = g_strdup(gal_view_get_title(view));
- item->type = g_strdup(gal_view_get_type_code(view));
- item->id = gal_view_generate_id(collection, view);
+ item->title = g_strdup (gal_view_get_title (view));
+ item->type = g_strdup (gal_view_get_type_code (view));
+ item->id = gal_view_generate_id (collection, view);
item->filename = g_strdup_printf("%s.galview", item->id);
item->view = view;
item->collection = collection;
- g_object_ref(view);
+ g_object_ref (view);
item->view_changed_id =
g_signal_connect(item->view, "changed",
G_CALLBACK (view_changed), item);
- collection->view_data = g_renew(GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
+ collection->view_data = g_renew (GalViewCollectionItem *, collection->view_data, collection->view_count + 1);
collection->view_data[collection->view_count] = item;
collection->view_count++;
- gal_view_collection_changed(collection);
+ gal_view_collection_changed (collection);
return item->id;
}
@@ -803,7 +803,7 @@ gal_view_collection_set_nth_view (GalViewCollection *collection, gint i, GalView
item->ever_changed = TRUE;
item->changed = TRUE;
- item->type = g_strdup(gal_view_get_type_code(view));
+ item->type = g_strdup (gal_view_get_type_code (view));
item->view_changed_id =
g_signal_connect(item->view, "changed",
diff --git a/widgets/menus/gal-view-etable.c b/widgets/menus/gal-view-etable.c
index 977d58b627..1dcf453c18 100644
--- a/widgets/menus/gal-view-etable.c
+++ b/widgets/menus/gal-view-etable.c
@@ -61,57 +61,57 @@ config_changed (ETableConfig *config, GalViewEtable *view)
{
ETableState *state;
if (view->state)
- g_object_unref(view->state);
+ g_object_unref (view->state);
g_object_get (config,
"state", &state,
NULL);
- view->state = e_table_state_duplicate(state);
+ view->state = e_table_state_duplicate (state);
g_object_unref (state);
- gal_view_changed(GAL_VIEW(view));
+ gal_view_changed (GAL_VIEW (view));
}
static void
gal_view_etable_edit (GalView *view, GtkWindow *parent)
{
- GalViewEtable *etable_view = GAL_VIEW_ETABLE(view);
+ GalViewEtable *etable_view = GAL_VIEW_ETABLE (view);
ETableConfig *config;
- config = e_table_config_new(etable_view->title,
+ config = e_table_config_new (etable_view->title,
etable_view->spec,
etable_view->state,
parent);
g_signal_connect(config, "changed",
- G_CALLBACK(config_changed), view);
+ G_CALLBACK (config_changed), view);
}
static void
gal_view_etable_load (GalView *view,
const gchar *filename)
{
- e_table_state_load_from_file(GAL_VIEW_ETABLE(view)->state, filename);
+ e_table_state_load_from_file (GAL_VIEW_ETABLE (view)->state, filename);
}
static void
gal_view_etable_save (GalView *view,
const gchar *filename)
{
- e_table_state_save_to_file(GAL_VIEW_ETABLE(view)->state, filename);
+ e_table_state_save_to_file (GAL_VIEW_ETABLE (view)->state, filename);
}
static const gchar *
gal_view_etable_get_title (GalView *view)
{
- return GAL_VIEW_ETABLE(view)->title;
+ return GAL_VIEW_ETABLE (view)->title;
}
static void
gal_view_etable_set_title (GalView *view,
const gchar *title)
{
- g_free(GAL_VIEW_ETABLE(view)->title);
- GAL_VIEW_ETABLE(view)->title = g_strdup(title);
+ g_free (GAL_VIEW_ETABLE (view)->title);
+ GAL_VIEW_ETABLE (view)->title = g_strdup (title);
}
static const gchar *
@@ -125,34 +125,34 @@ gal_view_etable_clone (GalView *view)
{
GalViewEtable *gve, *new;
- gve = GAL_VIEW_ETABLE(view);
+ gve = GAL_VIEW_ETABLE (view);
new = g_object_new (GAL_TYPE_VIEW_ETABLE, NULL);
new->spec = gve->spec;
new->title = g_strdup (gve->title);
- new->state = e_table_state_duplicate(gve->state);
+ new->state = e_table_state_duplicate (gve->state);
- g_object_ref(new->spec);
+ g_object_ref (new->spec);
- return GAL_VIEW(new);
+ return GAL_VIEW (new);
}
static void
gal_view_etable_dispose (GObject *object)
{
- GalViewEtable *view = GAL_VIEW_ETABLE(object);
+ GalViewEtable *view = GAL_VIEW_ETABLE (object);
gal_view_etable_detach (view);
- g_free(view->title);
+ g_free (view->title);
view->title = NULL;
if (view->spec)
- g_object_unref(view->spec);
+ g_object_unref (view->spec);
view->spec = NULL;
if (view->state)
- g_object_unref(view->state);
+ g_object_unref (view->state);
view->state = NULL;
if (G_OBJECT_CLASS (gal_view_etable_parent_class)->dispose)
@@ -180,7 +180,7 @@ static void
gal_view_etable_init (GalViewEtable *gve)
{
gve->spec = NULL;
- gve->state = e_table_state_new();
+ gve->state = e_table_state_new ();
gve->title = NULL;
}
@@ -227,16 +227,16 @@ gal_view_etable_construct (GalViewEtable *view,
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (spec), NULL);
if (spec)
- g_object_ref(spec);
+ g_object_ref (spec);
view->spec = spec;
if (view->state)
- g_object_unref(view->state);
- view->state = e_table_state_duplicate(spec->state);
+ g_object_unref (view->state);
+ view->state = e_table_state_duplicate (spec->state);
- view->title = g_strdup(title);
+ view->title = g_strdup (title);
- return GAL_VIEW(view);
+ return GAL_VIEW (view);
}
void
@@ -246,10 +246,10 @@ gal_view_etable_set_state (GalViewEtable *view, ETableState *state)
g_return_if_fail (E_IS_TABLE_STATE (state));
if (view->state)
- g_object_unref(view->state);
- view->state = e_table_state_duplicate(state);
+ g_object_unref (view->state);
+ view->state = e_table_state_duplicate (state);
- gal_view_changed(GAL_VIEW(view));
+ gal_view_changed (GAL_VIEW (view));
}
static void
@@ -261,7 +261,7 @@ table_state_changed (ETable *table, GalViewEtable *view)
g_object_unref (view->state);
view->state = state;
- gal_view_changed(GAL_VIEW(view));
+ gal_view_changed (GAL_VIEW (view));
}
static void
@@ -273,7 +273,7 @@ tree_state_changed (ETree *tree, GalViewEtable *view)
g_object_unref (view->state);
view->state = state;
- gal_view_changed(GAL_VIEW(view));
+ gal_view_changed (GAL_VIEW (view));
}
void
@@ -286,7 +286,7 @@ gal_view_etable_attach_table (GalViewEtable *view, ETable *table)
view->table = table;
- e_table_set_state_object(view->table, view->state);
+ e_table_set_state_object (view->table, view->state);
g_object_ref (view->table);
view->table_state_changed_id =
g_signal_connect(view->table, "state_change",
@@ -303,7 +303,7 @@ gal_view_etable_attach_tree (GalViewEtable *view, ETree *tree)
view->tree = tree;
- e_tree_set_state_object(view->tree, view->state);
+ e_tree_set_state_object (view->tree, view->state);
g_object_ref (view->tree);
view->tree_state_changed_id =
g_signal_connect(view->tree, "state_change",
diff --git a/widgets/menus/gal-view-factory-etable.h b/widgets/menus/gal-view-factory-etable.h
index 79aaa161e9..a107b87083 100644
--- a/widgets/menus/gal-view-factory-etable.h
+++ b/widgets/menus/gal-view-factory-etable.h
@@ -62,7 +62,7 @@ struct _GalViewFactoryEtableClass {
GalViewFactoryClass parent_class;
};
-GType gal_view_factory_etable_get_type(void);
+GType gal_view_factory_etable_get_type (void);
ETableSpecification *
gal_view_factory_etable_get_specification
(GalViewFactoryEtable *factory);
diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c
index 0d182608c5..fc5aff0c63 100644
--- a/widgets/menus/gal-view-instance.c
+++ b/widgets/menus/gal-view-instance.c
@@ -55,7 +55,7 @@ enum {
LAST_SIGNAL
};
-static guint gal_view_instance_signals [LAST_SIGNAL] = { 0, };
+static guint gal_view_instance_signals[LAST_SIGNAL] = { 0, };
static void
gal_view_instance_changed (GalViewInstance *instance)
@@ -64,7 +64,7 @@ gal_view_instance_changed (GalViewInstance *instance)
g_return_if_fail (GAL_IS_VIEW_INSTANCE (instance));
g_signal_emit (instance,
- gal_view_instance_signals [CHANGED], 0);
+ gal_view_instance_signals[CHANGED], 0);
}
static void
@@ -74,7 +74,7 @@ gal_view_instance_display_view (GalViewInstance *instance, GalView *view)
g_return_if_fail (GAL_IS_VIEW_INSTANCE (instance));
g_signal_emit (instance,
- gal_view_instance_signals [DISPLAY_VIEW], 0,
+ gal_view_instance_signals[DISPLAY_VIEW], 0,
view);
}
@@ -86,7 +86,7 @@ save_current_view (GalViewInstance *instance)
doc = xmlNewDoc((const guchar *)"1.0");
root = xmlNewNode (NULL, (const guchar *)"GalViewCurrentView");
- xmlDocSetRootElement(doc, root);
+ xmlDocSetRootElement (doc, root);
if (instance->current_id)
e_xml_set_string_prop_by_name (root, (const guchar *)"current_view", instance->current_id);
@@ -95,7 +95,7 @@ save_current_view (GalViewInstance *instance)
if (e_xml_save_file (instance->current_view_filename, doc) == -1)
g_warning ("Unable to save view to %s - %s", instance->current_view_filename, g_strerror(errno));
- xmlFreeDoc(doc);
+ xmlFreeDoc (doc);
}
static void
@@ -105,7 +105,7 @@ view_changed (GalView *view, GalViewInstance *instance)
g_free (instance->current_id);
instance->current_id = NULL;
save_current_view (instance);
- gal_view_instance_changed(instance);
+ gal_view_instance_changed (instance);
}
gal_view_save (view, instance->custom_filename);
@@ -137,8 +137,8 @@ connect_view (GalViewInstance *instance, GalView *view)
disconnect_view (instance);
instance->current_view = view;
- instance->current_title = g_strdup (gal_view_get_title(view));
- instance->current_type = g_strdup (gal_view_get_type_code(view));
+ instance->current_title = g_strdup (gal_view_get_title (view));
+ instance->current_type = g_strdup (gal_view_get_type_code (view));
instance->view_changed_id =
g_signal_connect(instance->current_view, "changed",
G_CALLBACK (view_changed), instance);
@@ -149,7 +149,7 @@ connect_view (GalViewInstance *instance, GalView *view)
static void
gal_view_instance_dispose (GObject *object)
{
- GalViewInstance *instance = GAL_VIEW_INSTANCE(object);
+ GalViewInstance *instance = GAL_VIEW_INSTANCE (object);
if (instance->collection) {
if (instance->collection_changed_id) {
@@ -179,7 +179,7 @@ gal_view_instance_class_init (GalViewInstanceClass *klass)
object_class->dispose = gal_view_instance_dispose;
- gal_view_instance_signals [DISPLAY_VIEW] =
+ gal_view_instance_signals[DISPLAY_VIEW] =
g_signal_new ("display_view",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -188,7 +188,7 @@ gal_view_instance_class_init (GalViewInstanceClass *klass)
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, GAL_TYPE_VIEW);
- gal_view_instance_signals [CHANGED] =
+ gal_view_instance_signals[CHANGED] =
g_signal_new ("changed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -197,7 +197,7 @@ gal_view_instance_class_init (GalViewInstanceClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- gal_view_instance_signals [LOADED] =
+ gal_view_instance_signals[LOADED] =
g_signal_new ("loaded",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
@@ -253,10 +253,10 @@ load_current_view (GalViewInstance *instance)
#ifdef G_OS_WIN32
gchar *locale_filename = g_win32_locale_filename_from_utf8 (instance->current_view_filename);
if (locale_filename != NULL)
- doc = xmlParseFile(locale_filename);
+ doc = xmlParseFile (locale_filename);
g_free (locale_filename);
#else
- doc = xmlParseFile(instance->current_view_filename);
+ doc = xmlParseFile (instance->current_view_filename);
#endif
}
@@ -270,14 +270,14 @@ load_current_view (GalViewInstance *instance)
if (index != -1) {
view = gal_view_collection_get_view (instance->collection,
index);
- view = gal_view_clone(view);
+ view = gal_view_clone (view);
connect_view (instance, view);
}
}
return;
}
- root = xmlDocGetRootElement(doc);
+ root = xmlDocGetRootElement (doc);
instance->current_id = e_xml_get_string_prop_by_name_with_default (root, (const guchar *)"current_view", NULL);
if (instance->current_id != NULL) {
@@ -287,7 +287,7 @@ load_current_view (GalViewInstance *instance)
if (index != -1) {
view = gal_view_collection_get_view (instance->collection,
index);
- view = gal_view_clone(view);
+ view = gal_view_clone (view);
}
}
if (view == NULL) {
@@ -301,7 +301,7 @@ load_current_view (GalViewInstance *instance)
connect_view (instance, view);
- xmlFreeDoc(doc);
+ xmlFreeDoc (doc);
}
/**
@@ -415,11 +415,11 @@ gal_view_instance_set_custom_view (GalViewInstance *instance, GalView *view)
connect_view (instance, view);
gal_view_save (view, instance->custom_filename);
save_current_view (instance);
- gal_view_instance_changed(instance);
+ gal_view_instance_changed (instance);
}
static void
-dialog_response(GtkWidget *dialog, gint id, GalViewInstance *instance)
+dialog_response (GtkWidget *dialog, gint id, GalViewInstance *instance)
{
if (id == GTK_RESPONSE_OK) {
gal_view_instance_save_as_dialog_save (GAL_VIEW_INSTANCE_SAVE_AS_DIALOG (dialog));
@@ -436,8 +436,8 @@ gal_view_instance_save_as (GalViewInstance *instance)
dialog = gal_view_instance_save_as_dialog_new (instance);
g_signal_connect(dialog, "response",
- G_CALLBACK(dialog_response), instance);
- gtk_widget_show(dialog);
+ G_CALLBACK (dialog_response), instance);
+ gtk_widget_show (dialog);
}
/* This is idempotent. Once it's been called once, the rest of the calls are ignored. */
diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c
index f364bf0779..1bc9369a48 100644
--- a/widgets/menus/gal-view-new-dialog.c
+++ b/widgets/menus/gal-view-new-dialog.c
@@ -101,8 +101,8 @@ gal_view_new_dialog_init (GalViewNewDialog *dialog)
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
- gtk_window_set_resizable (GTK_WINDOW(dialog), TRUE);
- gtk_window_set_modal (GTK_WINDOW(dialog), TRUE);
+ gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
+ gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gtk_window_set_title (GTK_WINDOW(dialog), _("Define New View"));
dialog->collection = NULL;
@@ -112,10 +112,10 @@ gal_view_new_dialog_init (GalViewNewDialog *dialog)
static void
gal_view_new_dialog_dispose (GObject *object)
{
- GalViewNewDialog *gal_view_new_dialog = GAL_VIEW_NEW_DIALOG(object);
+ GalViewNewDialog *gal_view_new_dialog = GAL_VIEW_NEW_DIALOG (object);
if (gal_view_new_dialog->builder)
- g_object_unref(gal_view_new_dialog->builder);
+ g_object_unref (gal_view_new_dialog->builder);
gal_view_new_dialog->builder = NULL;
if (G_OBJECT_CLASS (gal_view_new_dialog_parent_class)->dispose)
@@ -126,7 +126,7 @@ GtkWidget*
gal_view_new_dialog_new (GalViewCollection *collection)
{
GtkWidget *widget =
- gal_view_new_dialog_construct(g_object_new (GAL_VIEW_NEW_DIALOG_TYPE, NULL),
+ gal_view_new_dialog_construct (g_object_new (GAL_VIEW_NEW_DIALOG_TYPE, NULL),
collection);
return widget;
}
@@ -209,16 +209,16 @@ gal_view_new_dialog_construct (GalViewNewDialog *dialog,
gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->list), column);
iterator = dialog->collection->factory_list;
- for (; iterator; iterator = g_list_next(iterator) ) {
+ for (; iterator; iterator = g_list_next (iterator) ) {
GalViewFactory *factory = iterator->data;
GtkTreeIter iter;
- g_object_ref(factory);
+ g_object_ref (factory);
gtk_list_store_append (dialog->list_store,
&iter);
gtk_list_store_set (dialog->list_store,
&iter,
- 0, gal_view_factory_get_title(factory),
+ 0, gal_view_factory_get_title (factory),
1, factory,
-1);
}
@@ -233,7 +233,7 @@ gal_view_new_dialog_construct (GalViewNewDialog *dialog,
sensitize_ok_response (dialog);
- return GTK_WIDGET(dialog);
+ return GTK_WIDGET (dialog);
}
static void
@@ -247,8 +247,8 @@ gal_view_new_dialog_set_property (GObject *object, guint prop_id, const GValue *
switch (prop_id) {
case PROP_NAME:
entry = e_builder_get_widget(dialog->builder, "entry-name");
- if (entry && GTK_IS_ENTRY(entry)) {
- gtk_entry_set_text(GTK_ENTRY(entry), g_value_get_string (value));
+ if (entry && GTK_IS_ENTRY (entry)) {
+ gtk_entry_set_text (GTK_ENTRY (entry), g_value_get_string (value));
}
break;
default:
@@ -268,7 +268,7 @@ gal_view_new_dialog_get_property (GObject *object, guint prop_id, GValue *value,
switch (prop_id) {
case PROP_NAME:
entry = e_builder_get_widget(dialog->builder, "entry-name");
- if (entry && GTK_IS_ENTRY(entry)) {
+ if (entry && GTK_IS_ENTRY (entry)) {
g_value_set_string (value, gtk_entry_get_text (GTK_ENTRY (entry)));
}
break;
diff --git a/widgets/menus/gal-view.c b/widgets/menus/gal-view.c
index 3b70c7a3f5..f31f2191cd 100644
--- a/widgets/menus/gal-view.c
+++ b/widgets/menus/gal-view.c
@@ -274,6 +274,6 @@ gal_view_changed (GalView *view)
{
g_return_if_fail (GAL_IS_VIEW (view));
- g_signal_emit (view, signals [CHANGED], 0);
+ g_signal_emit (view, signals[CHANGED], 0);
}