aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/menus
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-07-12 20:02:18 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-08-20 02:17:55 +0800
commitc85109fc322137596bf34cffc5445d568223c60d (patch)
tree711e6d5b2eb3d6c7780d1d01e20d980c67a77f9e /widgets/menus
parent7d1751cc26a75166019917ec8c3b35e1083d27d6 (diff)
downloadgsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar
gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.gz
gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.bz2
gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.lz
gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.xz
gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.zst
gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'widgets/menus')
-rw-r--r--widgets/menus/gal-define-views-dialog.c2
-rw-r--r--widgets/menus/gal-define-views-model.c2
-rw-r--r--widgets/menus/gal-view-collection.c56
-rw-r--r--widgets/menus/gal-view-instance.c6
-rw-r--r--widgets/menus/gal-view-new-dialog.c10
5 files changed, 38 insertions, 38 deletions
diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c
index fb0d852a24..79d3104a08 100644
--- a/widgets/menus/gal-define-views-dialog.c
+++ b/widgets/menus/gal-define-views-dialog.c
@@ -358,7 +358,7 @@ gal_define_views_dialog_set_collection (GalDefineViewsDialog *dialog,
COL_GALVIEW_NAME, GTK_SORT_ASCENDING);
if (dialog->builder) {
- GtkWidget *widget = e_builder_get_widget(dialog->builder, "label-views");
+ GtkWidget *widget = e_builder_get_widget (dialog->builder, "label-views");
if (widget && GTK_IS_LABEL (widget)) {
if (collection->title) {
gchar *text = g_strdup_printf (_("Define Views for %s"),
diff --git a/widgets/menus/gal-define-views-model.c b/widgets/menus/gal-define-views-model.c
index bdfd970761..3fc6d701f5 100644
--- a/widgets/menus/gal-define-views-model.c
+++ b/widgets/menus/gal-define-views-model.c
@@ -197,7 +197,7 @@ static gpointer
gdvm_initialize_value (ETableModel *etc,
gint col)
{
- return g_strdup("");
+ return g_strdup ("");
}
static gboolean
diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c
index e05e1533cf..662b928b95 100644
--- a/widgets/menus/gal-view-collection.c
+++ b/widgets/menus/gal-view-collection.c
@@ -101,7 +101,7 @@ gal_view_generate_string (GalViewCollection *collection,
if (which == 1)
ret_val = g_strdup (gal_view_get_title (view));
else
- ret_val = g_strdup_printf("%s_%d", gal_view_get_title(view), which);
+ 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))) {
gchar *ptr = pointer;
@@ -363,10 +363,10 @@ load_single_file (GalViewCollection *collection,
item->ever_changed = local;
item->changed = FALSE;
item->built_in = !local;
- item->id = e_xml_get_string_prop_by_name(node, (const guchar *)"id");
- item->filename = e_xml_get_string_prop_by_name(node, (const guchar *)"filename");
- item->title = e_xml_get_translated_utf8_string_prop_by_name(node, (const guchar *)"title");
- item->type = e_xml_get_string_prop_by_name(node, (const guchar *)"type");
+ item->id = e_xml_get_string_prop_by_name (node, (const guchar *)"id");
+ item->filename = e_xml_get_string_prop_by_name (node, (const guchar *)"filename");
+ item->title = e_xml_get_translated_utf8_string_prop_by_name (node, (const guchar *)"title");
+ item->type = e_xml_get_string_prop_by_name (node, (const guchar *)"type");
item->collection = collection;
item->view_changed_id = 0;
@@ -392,7 +392,7 @@ load_single_dir (GalViewCollection *collection,
xmlDoc *doc = NULL;
xmlNode *root;
xmlNode *child;
- gchar *filename = g_build_filename(dir, "galview.xml", NULL);
+ gchar *filename = g_build_filename (dir, "galview.xml", NULL);
gchar *default_view;
if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) {
@@ -416,10 +416,10 @@ load_single_dir (GalViewCollection *collection,
gboolean found = FALSE;
gint i;
- if (!strcmp ((gchar *)child->name, "text"))
+ if (!strcmp ((gchar *) child->name, "text"))
continue;
- id = e_xml_get_string_prop_by_name(child, (const guchar *)"id");
+ 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 (!local)
@@ -485,7 +485,7 @@ gal_view_collection_load (GalViewCollection *collection)
g_return_if_fail (!collection->loaded);
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));
+ 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);
@@ -513,12 +513,12 @@ gal_view_collection_save (GalViewCollection *collection)
g_return_if_fail (GAL_IS_VIEW_COLLECTION (collection));
g_return_if_fail (collection->local_dir != NULL);
- doc = xmlNewDoc((const guchar *)"1.0");
- root = xmlNewNode(NULL, (const guchar *)"GalViewCollection");
+ doc = xmlNewDoc ((const guchar *)"1.0");
+ root = xmlNewNode (NULL, (const guchar *)"GalViewCollection");
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);
+ e_xml_set_string_prop_by_name (root, (const guchar *)"default-view", collection->default_view);
}
for (i = 0; i < collection->view_count; i++) {
@@ -527,11 +527,11 @@ gal_view_collection_save (GalViewCollection *collection)
item = collection->view_data[i];
if (item->ever_changed) {
- child = xmlNewChild(root, NULL, (const guchar *)"GalView", NULL);
- e_xml_set_string_prop_by_name(child, (const guchar *)"id", item->id);
- e_xml_set_string_prop_by_name(child, (const guchar *)"title", item->title);
- e_xml_set_string_prop_by_name(child, (const guchar *)"filename", item->filename);
- e_xml_set_string_prop_by_name(child, (const guchar *)"type", item->type);
+ child = xmlNewChild (root, NULL, (const guchar *)"GalView", NULL);
+ e_xml_set_string_prop_by_name (child, (const guchar *)"id", item->id);
+ e_xml_set_string_prop_by_name (child, (const guchar *)"title", item->title);
+ e_xml_set_string_prop_by_name (child, (const guchar *)"filename", item->filename);
+ 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);
@@ -546,14 +546,14 @@ gal_view_collection_save (GalViewCollection *collection)
item = collection->removed_view_data[i];
- child = xmlNewChild(root, NULL, (const guchar *)"GalView", NULL);
- e_xml_set_string_prop_by_name(child, (const guchar *)"id", item->id);
- e_xml_set_string_prop_by_name(child, (const guchar *)"title", item->title);
- e_xml_set_string_prop_by_name(child, (const guchar *)"type", item->type);
+ child = xmlNewChild (root, NULL, (const guchar *)"GalView", NULL);
+ e_xml_set_string_prop_by_name (child, (const guchar *)"id", item->id);
+ e_xml_set_string_prop_by_name (child, (const guchar *)"title", item->title);
+ e_xml_set_string_prop_by_name (child, (const guchar *)"type", item->type);
}
- filename = g_build_filename(collection->local_dir, "galview.xml", NULL);
+ 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));
+ g_warning ("Unable to save view to %s - %s", filename, g_strerror (errno));
xmlFreeDoc (doc);
g_free (filename);
}
@@ -649,7 +649,7 @@ gal_view_collection_append (GalViewCollection *collection,
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->filename = g_strdup_printf ("%s.galview", item->id);
item->view = view;
item->collection = collection;
g_object_ref (view);
@@ -710,7 +710,7 @@ gal_view_collection_copy_view (GalViewCollection *collection,
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->filename = g_strdup_printf ("%s.galview", item->id);
item->view = gal_view_clone (view);
item->collection = collection;
@@ -743,7 +743,7 @@ gal_view_collection_append_with_title (GalViewCollection *collection,
gal_view_set_title (view, title);
- d(g_print("%s: %p\n", G_STRFUNC, view));
+ d (g_print ("%s: %p\n", G_STRFUNC, view));
item = g_new (GalViewCollectionItem, 1);
item->ever_changed = TRUE;
@@ -752,7 +752,7 @@ gal_view_collection_append_with_title (GalViewCollection *collection,
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->filename = g_strdup_printf ("%s.galview", item->id);
item->view = view;
item->collection = collection;
g_object_ref (view);
@@ -781,7 +781,7 @@ gal_view_collection_set_nth_view (GalViewCollection *collection,
g_return_val_if_fail (i >= 0, NULL);
g_return_val_if_fail (i < collection->view_count, NULL);
- d(g_print("%s: %p\n", G_STRFUNC, view));
+ d (g_print ("%s: %p\n", G_STRFUNC, view));
item = collection->view_data[i];
diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c
index 2bb621b7ea..e73b6fb304 100644
--- a/widgets/menus/gal-view-instance.c
+++ b/widgets/menus/gal-view-instance.c
@@ -87,7 +87,7 @@ save_current_view (GalViewInstance *instance)
xmlDoc *doc;
xmlNode *root;
- doc = xmlNewDoc((const guchar *)"1.0");
+ doc = xmlNewDoc ((const guchar *)"1.0");
root = xmlNewNode (NULL, (const guchar *)"GalViewCurrentView");
xmlDocSetRootElement (doc, root);
@@ -97,7 +97,7 @@ save_current_view (GalViewInstance *instance)
e_xml_set_string_prop_by_name (root, (const guchar *)"current_view_type", instance->current_type);
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));
+ g_warning ("Unable to save view to %s - %s", instance->current_view_filename, g_strerror (errno));
xmlFreeDoc (doc);
}
@@ -390,7 +390,7 @@ gal_view_instance_set_current_view_id (GalViewInstance *instance,
g_return_if_fail (instance != NULL);
g_return_if_fail (GAL_IS_VIEW_INSTANCE (instance));
- d(g_print("%s: view_id set to %s\n", G_STRFUNC, view_id));
+ d (g_print ("%s: view_id set to %s\n", G_STRFUNC, view_id));
if (instance->current_id && !strcmp (instance->current_id, view_id))
return;
diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c
index 36d742963a..0e99e3271c 100644
--- a/widgets/menus/gal-view-new-dialog.c
+++ b/widgets/menus/gal-view-new-dialog.c
@@ -54,7 +54,7 @@ gal_view_new_dialog_set_property (GObject *object,
switch (property_id) {
case PROP_NAME:
- entry = e_builder_get_widget(dialog->builder, "entry-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));
}
@@ -78,7 +78,7 @@ gal_view_new_dialog_get_property (GObject *object,
switch (property_id) {
case PROP_NAME:
- entry = e_builder_get_widget(dialog->builder, "entry-name");
+ entry = e_builder_get_widget (dialog->builder, "entry-name");
if (entry && GTK_IS_ENTRY (entry)) {
g_value_set_string (value, gtk_entry_get_text (GTK_ENTRY (entry)));
}
@@ -169,7 +169,7 @@ gal_view_new_dialog_init (GalViewNewDialog *dialog)
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"));
+ gtk_window_set_title (GTK_WINDOW (dialog), _("Define New View"));
dialog->collection = NULL;
dialog->selected_factory = NULL;
@@ -242,8 +242,8 @@ gal_view_new_dialog_construct (GalViewNewDialog *dialog,
GtkCellRenderer *rend;
dialog->collection = collection;
- dialog->list = e_builder_get_widget(dialog->builder,"list-type-list");
- dialog->entry = e_builder_get_widget(dialog->builder, "entry-name");
+ dialog->list = e_builder_get_widget (dialog->builder,"list-type-list");
+ dialog->entry = e_builder_get_widget (dialog->builder, "entry-name");
dialog->list_store = gtk_list_store_new (
2, G_TYPE_STRING, G_TYPE_POINTER);