From c30d29425eccafea02e95ea6e81679508c878784 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 1 May 2010 23:18:28 -0400 Subject: Coding style and whitespace cleanup. --- shell/e-shell-meego.c | 26 +++++++++++++------------- shell/e-shell-switcher.c | 2 +- shell/e-shell-view.c | 5 ++++- shell/e-shell-window-actions.c | 6 +++--- shell/e-shell-window-private.c | 2 +- 5 files changed, 22 insertions(+), 19 deletions(-) (limited to 'shell') diff --git a/shell/e-shell-meego.c b/shell/e-shell-meego.c index 70401c1e62..3f024c4c99 100644 --- a/shell/e-shell-meego.c +++ b/shell/e-shell-meego.c @@ -40,11 +40,11 @@ void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen) GdkAtom wm_win, mob_atom; Atom dummy_t; unsigned long dummy_l; - int dummy_i; + gint dummy_i; GdkScreen *screen; GdkDisplay *display; Window *wm_window_v = NULL; - unsigned char *moblin_string = NULL; + guchar *moblin_string = NULL; GModule *module; /* * Wow - this is unpleasant, but it is hard to link directly @@ -52,10 +52,10 @@ void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen) * to get to the (mind-mashed) 'supporting' window. */ struct { - int (*XFree) (void *); - int (*XGetWindowProperty) (Display*, XID, Atom, long, long, Bool, - Atom, Atom *, int *, unsigned long*, - unsigned long*, unsigned char**); + gint (*XFree) (gpointer); + gint (*XGetWindowProperty) (Display*, XID, Atom, long, long, Bool, + Atom, Atom *, gint *, unsigned long*, + unsigned long*, guchar **); } fns = { 0, 0 }; *is_meego = *small_screen = FALSE; @@ -85,12 +85,12 @@ void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen) gdk_error_trap_push (); /* get the window manager's supporting window */ - fns.XGetWindowProperty (gdk_x11_display_get_xdisplay (display), + fns.XGetWindowProperty (gdk_x11_display_get_xdisplay (display), GDK_WINDOW_XID (gdk_screen_get_root_window (screen)), gdk_x11_atom_to_xatom_for_display (display, wm_win), 0, 1, False, XA_WINDOW, &dummy_t, &dummy_i, - &dummy_l, &dummy_l, (unsigned char **)(&wm_window_v)); - + &dummy_l, &dummy_l, (guchar **)(&wm_window_v)); + /* get the '_Moblin' setting */ if (wm_window_v && (*wm_window_v != None)) fns.XGetWindowProperty (gdk_x11_display_get_xdisplay (display), *wm_window_v, @@ -102,8 +102,8 @@ void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen) gdk_error_trap_pop (); if (moblin_string) { - int i; - char **props; + gint i; + gchar **props; g_warning ("prop '%s'", moblin_string); @@ -112,7 +112,7 @@ void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen) props = g_strsplit ((gchar *)moblin_string, ":", -1); for (i = 0; props && props[i]; i++) { - char **pair = g_strsplit (props[i], "=", 2); + gchar **pair = g_strsplit (props[i], "=", 2); g_warning ("pair '%s'='%s'", pair ? pair[0] : "", pair && pair[0] ? pair[1] : ""); @@ -138,7 +138,7 @@ void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen) /* gcc -g -O0 -Wall -I. -DTEST_APP `pkg-config --cflags --libs gtk+-2.0` e-shell-meego.c && ./a.out */ #include -int main (int argc, char **argv) +gint main (gint argc, gchar **argv) { gboolean is_meego, small_screen; diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c index c09258b7a2..db788e20f3 100644 --- a/shell/e-shell-switcher.c +++ b/shell/e-shell-switcher.c @@ -574,7 +574,7 @@ tool_item_button_cb (GtkWidget *internal_widget, * * Adds a button to @switcher that proxies for @switcher_action. * Switcher buttons appear in the order they were added. A middle - * click opens a new window of this type. + * click opens a new window of this type. * * #EShellWindow adds switcher actions in the order given by the * sort_order field in #EShellBackendClass. diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index bc4084e473..a8ece91adf 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -1724,7 +1724,10 @@ e_shell_view_unblock_update_actions (EShellView *shell_view) g_return_if_fail (shell_view->priv->update_actions_blocked > 0); shell_view->priv->update_actions_blocked--; - if (!shell_view->priv->update_actions_blocked && shell_view->priv->update_actions_called) { + + if (!shell_view->priv->update_actions_blocked && + shell_view->priv->update_actions_called) { + shell_view->priv->update_actions_called = FALSE; e_shell_view_update_actions (shell_view); } diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c index d33be7de1d..0f94dd08ec 100644 --- a/shell/e-shell-window-actions.c +++ b/shell/e-shell-window-actions.c @@ -1888,7 +1888,7 @@ e_shell_window_actions_init (EShellWindow *shell_window) EFocusTracker *focus_tracker; GtkUIManager *ui_manager; gchar *path; - + g_return_if_fail (E_IS_SHELL_WINDOW (shell_window)); ui_manager = e_shell_window_get_ui_manager (shell_window); @@ -2113,8 +2113,8 @@ e_shell_window_create_new_menu (EShellWindow *shell_window) static GtkAction * e_shell_window_create_switcher_action (GType type, EShellViewClass *class, - const char *name, const char *tooltip, - const char *view_name) + const gchar *name, const gchar *tooltip, + const gchar *view_name) { GtkAction *action; diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index be5064a698..a2b8ccec40 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -443,7 +443,7 @@ e_shell_window_private_constructed (EShellWindow *shell_window) gconf_bridge_bind_property (bridge, key, object, "sidebar-visible"); if (e_shell_get_express_mode (shell)) { - const char *active_view = e_shell_window_get_active_view (shell_window); + const gchar *active_view = e_shell_window_get_active_view (shell_window); e_shell_window_set_switcher_visible (shell_window, FALSE); e_shell_window_set_taskbar_visible (shell_window, active_view && !strcmp (active_view, "mail")); -- cgit v1.2.3