aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-05-25 22:15:32 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-05-25 22:15:32 +0800
commit96538878911586a9e9ca26b81e1916c04e538980 (patch)
treeffcfe184bab289d6917a65d850bc4ba310be0447 /shell
parent3e1b34841d3a699f77848f5de019f18ccb2d1ca1 (diff)
downloadgsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.tar
gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.tar.gz
gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.tar.bz2
gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.tar.lz
gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.tar.xz
gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.tar.zst
gsoc2013-evolution-96538878911586a9e9ca26b81e1916c04e538980.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-meego.c30
-rw-r--r--shell/e-shell-switcher.c2
-rw-r--r--shell/e-shell-utils.c32
-rw-r--r--shell/e-shell-utils.h2
-rw-r--r--shell/e-shell-view.c24
-rw-r--r--shell/e-shell-window-actions.c9
-rw-r--r--shell/e-shell-window-private.c2
-rw-r--r--shell/e-shell-window.c5
-rw-r--r--shell/e-shell.c9
-rw-r--r--shell/e-shell.h6
-rw-r--r--shell/main.c4
11 files changed, 66 insertions, 59 deletions
diff --git a/shell/e-shell-meego.c b/shell/e-shell-meego.c
index 3e1bb8a393..0b54250498 100644
--- a/shell/e-shell-meego.c
+++ b/shell/e-shell-meego.c
@@ -38,7 +38,7 @@ void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen)
void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen)
{
Window *wm_window_v = NULL;
- unsigned char *moblin_string = NULL;
+ guchar *moblin_string = NULL;
GModule *module = NULL;
/*
* Wow - this is unpleasant, but it is hard to link directly
@@ -46,22 +46,22 @@ 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;
- moblin_string = (unsigned char *)g_getenv ("EVO_MEEGO");
+ moblin_string = (guchar *)g_getenv ("EVO_MEEGO");
if (!moblin_string) {
GdkScreen *screen;
GdkDisplay *display;
GdkAtom wm_win, mob_atom;
Atom dummy_t;
unsigned long dummy_l;
- int dummy_i;
+ gint dummy_i;
if (!gdk_display_get_default ())
return;
@@ -88,12 +88,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,
@@ -101,13 +101,13 @@ void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen)
0, 8192, False, XA_STRING,
&dummy_t, &dummy_i, &dummy_l, &dummy_l,
&moblin_string);
-
+
gdk_error_trap_pop ();
}
if (moblin_string) {
- int i;
- char **props;
+ gint i;
+ gchar **props;
g_warning ("prop '%s'", moblin_string);
@@ -116,7 +116,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] : "<null>",
pair && pair[0] ? pair[1] : "<null>");
@@ -143,7 +143,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 <gtk/gtk.h>
-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 c12423de99..474a22d22c 100644
--- a/shell/e-shell-switcher.c
+++ b/shell/e-shell-switcher.c
@@ -573,7 +573,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
* <structfield>sort_order</structfield> field in #EShellBackendClass.
diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c
index 2a9f6f4f72..9fbb0bbca0 100644
--- a/shell/e-shell-utils.c
+++ b/shell/e-shell-utils.c
@@ -355,25 +355,25 @@ e_shell_utils_import_uris (EShell *shell, gchar **uris, gboolean preview)
* @builder: a #GtkBuilder
* @widget_name: NULL-terminated list of strings
*
- * If Evolution is running in Express mode (i.e. if the specified @shell is in
- * Express mode), then this function will hide a list of widgets, based on their
- * specified names. The list of names must be NULL-terminated, and each element
- * of that list must be the name of a widget present in @builder. Those widgets
- * will then get hidden.
+ * If Evolution is running in Express mode (i.e. if the specified @shell is
+ * in Express mode), then this function will hide a list of widgets, based
+ * on their specified names. The list of names must be NULL-terminated,
+ * and each element of that list must be the name of a widget present in
+ * @builder. Those widgets will then get hidden.
*
- * This can be used to simplify preference dialogs and such in an easy fashion, for use
- * in Express mode.
+ * This can be used to simplify preference dialogs and such in an easy
+ * fashion, for use in Express mode.
*
* If Evolution is not running in Express mode, this function does nothing.
*/
void
e_shell_hide_widgets_for_express_mode (EShell *shell,
- GtkBuilder *builder,
- const char *widget_name,
- ...)
+ GtkBuilder *builder,
+ const gchar *widget_name,
+ ...)
{
va_list args;
- const char *name;
+ const gchar *name;
g_return_if_fail (E_IS_SHELL (shell));
g_return_if_fail (GTK_IS_BUILDER (builder));
@@ -384,19 +384,21 @@ e_shell_hide_widgets_for_express_mode (EShell *shell,
va_start (args, widget_name);
- name = va_arg (args, const char *);
+ name = va_arg (args, const gchar *);
while (name) {
GObject *object;
object = gtk_builder_get_object (builder, name);
- if (!object || !GTK_IS_WIDGET (object)) {
- g_error ("Object '%s' was not found in the builder file, or it is not a GtkWidget", name);
+ if (!GTK_IS_WIDGET (object)) {
+ g_error (
+ "Object '%s' was not found in the builder "
+ "file, or it is not a GtkWidget", name);
g_assert_not_reached ();
}
gtk_widget_hide (GTK_WIDGET (object));
- name = va_arg (args, const char *);
+ name = va_arg (args, const gchar *);
}
va_end (args);
diff --git a/shell/e-shell-utils.h b/shell/e-shell-utils.h
index e552cc2e19..1b7202a5c5 100644
--- a/shell/e-shell-utils.h
+++ b/shell/e-shell-utils.h
@@ -52,7 +52,7 @@ guint e_shell_utils_import_uris (EShell *shell,
void e_shell_hide_widgets_for_express_mode (EShell *shell,
GtkBuilder *builder,
- const char *widget_name,
+ const gchar *widget_name,
...) G_GNUC_NULL_TERMINATED;
G_END_DECLS
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index be099b9869..5c19380da3 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -661,17 +661,24 @@ shell_view_construct_searchbar (EShellView *shell_view)
if (e_shell_get_small_screen_mode (shell)) {
GtkWidget *image;
+ GtkWidget *container;
GtkAction *action;
GtkToolItem *item;
- action = e_shell_window_get_action (shell_window, "close-window");
- image = gtk_image_new_from_icon_name ("window-close-hover",
- GTK_ICON_SIZE_DIALOG);
- item = gtk_tool_button_new (image, gtk_action_get_label (action));
+ action = e_shell_window_get_action (
+ shell_window, "close-window");
+ image = gtk_image_new_from_icon_name (
+ "window-close-hover", GTK_ICON_SIZE_DIALOG);
+ item = gtk_tool_button_new (
+ image, gtk_action_get_label (action));
gtk_widget_set_name (GTK_WIDGET (item), "MeeGoCloseButton");
- gtk_activatable_set_related_action (GTK_ACTIVATABLE (item), action);
- gtk_box_pack_start ((GtkBox *)e_shell_window_get_menu_bar_box(shell_window), (GtkWidget *)item, FALSE, FALSE, 0);
- gtk_widget_show_all((GtkWidget *)item);
+ gtk_activatable_set_related_action (
+ GTK_ACTIVATABLE (item), action);
+ container = e_shell_window_get_menu_bar_box (shell_window);
+ gtk_box_pack_start (
+ GTK_BOX (container),
+ GTK_WIDGET (item), FALSE, FALSE, 0);
+ gtk_widget_show_all (GTK_WIDGET (item));
}
return widget;
@@ -1739,7 +1746,8 @@ 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 65c6acff7a..16b39928ff 100644
--- a/shell/e-shell-window-actions.c
+++ b/shell/e-shell-window-actions.c
@@ -934,7 +934,7 @@ action_preferences_cb (GtkAction *action,
} else {
e_preferences_window_show_page (
E_PREFERENCES_WINDOW (preferences_window),
- shell_backend_class->preferences_page);
+ shell_backend_class->preferences_page);
}
}
}
@@ -1460,7 +1460,6 @@ static GtkActionEntry shell_entries[] = {
N_("Close this window"),
G_CALLBACK (action_close_cb) },
-
{ "close-window",
GTK_STOCK_CLOSE,
N_("_Close Window"),
@@ -1906,7 +1905,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);
@@ -2133,8 +2132,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 6878ff7456..6e47132bc1 100644
--- a/shell/e-shell-window-private.c
+++ b/shell/e-shell-window-private.c
@@ -445,7 +445,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"));
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index 7970f5b015..413f799949 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -355,7 +355,7 @@ shell_window_construct_menubar (EShellWindow *shell_window)
gtk_widget_show (child);
gtk_container_add ((GtkContainer *)parent, child);
shell_window->priv->menubar_box = child;
-
+
e_mutual_binding_new (main_menu, "visible",
child, "visible");
main_menu = child;
@@ -440,7 +440,7 @@ shell_window_construct_toolbar (EShellWindow *shell_window)
gtk_box_pack_start (GTK_BOX (box), toolbar, FALSE, FALSE, 0);
if (e_shell_get_meego_mode (shell_window->priv->shell))
gtk_widget_set_name (GTK_WIDGET (toolbar), "MeeGoToolbar");
-
+
return box;
}
@@ -683,7 +683,6 @@ e_shell_window_class_init (EShellWindowClass *class)
class->construct_taskbar = shell_window_construct_taskbar;
class->create_shell_view = shell_window_create_shell_view;
-
/**
* EShellWindow:active-view
*
diff --git a/shell/e-shell.c b/shell/e-shell.c
index a786bf6eed..e41d836730 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -61,7 +61,7 @@ struct _EShellPrivate {
gchar *geometry;
gchar *module_directory;
-
+
gchar *startup_view;
guint auto_reconnect : 1;
@@ -1940,7 +1940,7 @@ e_shell_adapt_window_size (EShell *shell,
scr = gdk_screen_get_default ();
monitor = gdk_screen_get_monitor_at_window (scr, GTK_WIDGET (window)->window);
gdk_screen_get_monitor_geometry (scr, monitor, &rect);
-
+
gtk_window_set_default_size (window, rect.width, rect.height);
gtk_window_set_decorated (window, FALSE);
gtk_window_maximize (window);
@@ -1948,13 +1948,12 @@ e_shell_adapt_window_size (EShell *shell,
void
e_shell_set_startup_view (EShell *shell,
- const char *view)
+ const gchar *view)
{
shell->priv->startup_view = g_strdup(view);
}
-
-const char *
+const gchar *
e_shell_get_startup_view (EShell *shell)
{
return shell->priv->startup_view;
diff --git a/shell/e-shell.h b/shell/e-shell.h
index 0b8c3336c8..f1d76b9ea6 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -127,9 +127,9 @@ void e_shell_cancel_quit (EShell *shell);
void e_shell_adapt_window_size (EShell *shell,
GtkWindow *window);
-void e_shell_set_startup_view (EShell *shell,
- const char *view);
-const char * e_shell_get_startup_view (EShell *shell);
+void e_shell_set_startup_view (EShell *shell,
+ const gchar *view);
+const gchar * e_shell_get_startup_view (EShell *shell);
G_END_DECLS
diff --git a/shell/main.c b/shell/main.c
index f342f35588..c41071a349 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -507,9 +507,9 @@ main (gint argc, gchar **argv)
g_warning ("Could not set PATH for Evolution and its child processes");
g_free (path);
-
+
_e_win32_register_mailer ();
-
+
if (reinstall) {
_e_win32_set_default_mailer ();
exit (0);