aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-07-01 12:07:26 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-08-13 23:27:51 +0800
commitf59681796df8fe0138a1754abbe8ec781bc1535e (patch)
tree0ced0c119ffed095713d7f64732686df9b2d9152 /e-util
parentbf4a1a13e3295deefc4031a446627ff9b1c95c7a (diff)
downloadgsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.tar
gsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.tar.gz
gsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.tar.bz2
gsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.tar.lz
gsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.tar.xz
gsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.tar.zst
gsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-config.h82
-rw-r--r--e-util/gconf-bridge.c36
2 files changed, 80 insertions, 38 deletions
diff --git a/e-util/e-config.h b/e-util/e-config.h
index f7484e7947..c2bdffb080 100644
--- a/e-util/e-config.h
+++ b/e-util/e-config.h
@@ -57,20 +57,20 @@ typedef struct _EConfigItem EConfigItem;
typedef struct _EConfigFactory EConfigFactory;
typedef struct _EConfigTarget EConfigTarget;
-typedef void (*EConfigFactoryFunc) (EConfig *ec,
+typedef void (*EConfigFactoryFunc) (EConfig *config,
gpointer data);
typedef gboolean
- (*EConfigCheckFunc) (EConfig *ec,
+ (*EConfigCheckFunc) (EConfig *config,
const gchar *pageid,
gpointer data);
-typedef void (*EConfigItemsFunc) (EConfig *ec,
+typedef void (*EConfigItemsFunc) (EConfig *config,
GSList *items,
gpointer data);
typedef GtkWidget *
- (*EConfigItemFactoryFunc) (EConfig *ec,
+ (*EConfigItemFactoryFunc) (EConfig *config,
EConfigItem *item,
GtkWidget *parent,
GtkWidget *old,
@@ -170,7 +170,8 @@ enum _e_config_t {
**/
struct _EConfigItem {
enum _e_config_t type;
- gchar *path; /* absolute path, must sort ascii-lexographically into the right spot */
+ gchar *path; /* absolute path, must sort
+ * ascii-lexographically into the right spot */
gchar *label;
EConfigItemFactoryFunc factory;
gpointer user_data;
@@ -257,35 +258,60 @@ struct _EConfigClass {
void (*commit) (EConfig *config);
};
-GType e_config_get_type (void);
+GType e_config_get_type (void);
/* Static class methods */
-EConfigFactory *e_config_class_add_factory (EConfigClass *klass, const gchar *id, EConfigFactoryFunc func, gpointer user_data);
-void e_config_class_remove_factory (EConfigClass *klass, EConfigFactory *f);
-
-EConfig *e_config_construct (EConfig *, gint type, const gchar *id);
-
-void e_config_add_items (EConfig *, GSList *items, EConfigItemsFunc freefunc, gpointer data);
-void e_config_add_page_check (EConfig *, const gchar *pageid, EConfigCheckFunc, gpointer data);
-void e_config_set_page_is_finish (EConfig *ec, const gchar *pageid, gboolean is_finish);
+EConfigFactory *e_config_class_add_factory (EConfigClass *klass,
+ const gchar *id,
+ EConfigFactoryFunc func,
+ gpointer user_data);
+void e_config_class_remove_factory (EConfigClass *klass,
+ EConfigFactory *f);
+
+EConfig * e_config_construct (EConfig *config,
+ gint type,
+ const gchar *id);
+
+void e_config_add_items (EConfig *config,
+ GSList *items,
+ EConfigItemsFunc freefunc,
+ gpointer data);
+void e_config_add_page_check (EConfig *config,
+ const gchar *pageid,
+ EConfigCheckFunc func,
+ gpointer data);
+void e_config_set_page_is_finish (EConfig *config,
+ const gchar *pageid,
+ gboolean is_finish);
-void e_config_set_target (EConfig *emp, EConfigTarget *target);
-GtkWidget *e_config_create_widget (EConfig *);
-GtkWidget *e_config_create_window (EConfig *emp, GtkWindow *parent, const gchar *title);
+void e_config_set_target (EConfig *config,
+ EConfigTarget *target);
+GtkWidget * e_config_create_widget (EConfig *config);
+GtkWidget * e_config_create_window (EConfig *config,
+ GtkWindow *parent,
+ const gchar *title);
-void e_config_target_changed (EConfig *emp, e_config_target_change_t how);
+void e_config_target_changed (EConfig *config,
+ e_config_target_change_t how);
-gboolean e_config_page_check (EConfig *, const gchar *);
+gboolean e_config_page_check (EConfig *config,
+ const gchar *pageid);
-GtkWidget *e_config_page_get (EConfig *ec, const gchar *pageid);
-const gchar *e_config_page_next (EConfig *ec, const gchar *pageid);
-const gchar *e_config_page_prev (EConfig *ec, const gchar *pageid);
+GtkWidget * e_config_page_get (EConfig *config,
+ const gchar *pageid);
+const gchar * e_config_page_next (EConfig *config,
+ const gchar *pageid);
+const gchar * e_config_page_prev (EConfig *config,
+ const gchar *pageid);
-void e_config_abort (EConfig *);
-void e_config_commit (EConfig *);
+void e_config_abort (EConfig *config);
+void e_config_commit (EConfig *config);
-gpointer e_config_target_new (EConfig *, gint type, gsize size);
-void e_config_target_free (EConfig *, gpointer );
+gpointer e_config_target_new (EConfig *config,
+ gint type,
+ gsize size);
+void e_config_target_free (EConfig *config,
+ gpointer);
/* ********************************************************************** */
@@ -416,7 +442,9 @@ struct _EConfigHookClass {
GType e_config_hook_get_type (void);
/* for implementors */
-void e_config_hook_class_add_target_map (EConfigHookClass *klass, const EConfigHookTargetMap *);
+void e_config_hook_class_add_target_map
+ (EConfigHookClass *klass,
+ const EConfigHookTargetMap *map);
G_END_DECLS
diff --git a/e-util/gconf-bridge.c b/e-util/gconf-bridge.c
index 46bc1d7288..9b0e609560 100644
--- a/e-util/gconf-bridge.c
+++ b/e-util/gconf-bridge.c
@@ -734,15 +734,22 @@ window_binding_state_event_cb (GtkWindow *window,
width and height is the one user stored before maximization */
gint width, height;
- width = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (window), "binding-premax-width"));
- height = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (window), "binding-premax-height"));
+ width = GPOINTER_TO_INT (g_object_get_data (
+ G_OBJECT (window), "binding-premax-width"));
+ height = GPOINTER_TO_INT (g_object_get_data (
+ G_OBJECT (window), "binding-premax-height"));
if (width && height) {
gtk_window_resize (window, width, height);
- /* do this only once, as it is restore after loading maximized state */
- g_object_set_data (G_OBJECT (window), "binding-premax-width", NULL);
- g_object_set_data (G_OBJECT (window), "binding-premax-height", NULL);
+ /* Do this only once, as it is restored
+ * after loading maximized state. */
+ g_object_set_data (
+ G_OBJECT (window),
+ "binding-premax-width", NULL);
+ g_object_set_data (
+ G_OBJECT (window),
+ "binding-premax-height", NULL);
}
}
@@ -861,16 +868,23 @@ gconf_bridge_bind_window (GConfBridge *bridge,
if (maximized_val) {
if (gconf_value_get_bool (maximized_val)) {
- /* maximize is not done immediately, but to count with proper
- window size, resize it before. The previous size is restored
- after the maximization is changed, in window_binding_state_event_cb ()
- */
+ /* Maximize is not done immediately, but to
+ * count with proper window size, resize it
+ * before. The previous size is restored
+ * after the maximization is changed,
+ * in window_binding_state_event_cb(). */
gint width = 0, height = 0;
GdkScreen *screen;
gtk_window_get_size (window, &width, &height);
- g_object_set_data (G_OBJECT (window), "binding-premax-width", GINT_TO_POINTER (width));
- g_object_set_data (G_OBJECT (window), "binding-premax-height", GINT_TO_POINTER (height));
+ g_object_set_data (
+ G_OBJECT (window),
+ "binding-premax-width",
+ GINT_TO_POINTER (width));
+ g_object_set_data (
+ G_OBJECT (window),
+ "binding-premax-height",
+ GINT_TO_POINTER (height));
screen = gtk_window_get_screen (window);
gtk_window_resize (window,