[evolution/express2: 26/27] Fix compiler warnings.



commit 3e1b34841d3a699f77848f5de019f18ccb2d1ca1
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue May 25 09:41:48 2010 -0400

    Fix compiler warnings.

 modules/calendar/e-cal-shell-backend.c  |    2 +
 modules/calendar/e-cal-shell-content.c  |  147 ++++++++++++++++---------------
 plugins/startup-wizard/startup-wizard.c |   10 ++-
 shell/main.c                            |    2 +-
 widgets/misc/e-preferences-window.c     |    4 +-
 widgets/misc/e-preferences-window.h     |    4 +-
 6 files changed, 88 insertions(+), 81 deletions(-)
---
diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c
index 86750f0..278190e 100644
--- a/modules/calendar/e-cal-shell-backend.c
+++ b/modules/calendar/e-cal-shell-backend.c
@@ -130,6 +130,8 @@ cal_shell_backend_ensure_sources (EShellBackend *shell_backend)
 		base_uri[7] = base_uri_seventh;
 	}
 
+	name = _("On This Computer");
+
 	if (on_this_computer != NULL) {
 		GSList *sources, *iter;
 		const gchar *group_base_uri;
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c
index e35b935..bf812f5 100644
--- a/modules/calendar/e-cal-shell-content.c
+++ b/modules/calendar/e-cal-shell-content.c
@@ -318,7 +318,6 @@ cal_shell_content_constructed (GObject *object)
 	ECalModel *task_model=NULL;
 	EShell *shell;
 	EShellContent *shell_content;
-	EShellBackend *shell_backend;
 	EShellView *shell_view;
 	EShellWindow *shell_window;
 	EShellContent *foreign_content;
@@ -345,7 +344,7 @@ cal_shell_content_constructed (GObject *object)
 
 	/* We borrow the memopad and taskpad models from the memo
 	 * and task views, loading the views if necessary. */
-	if(!e_shell_get_express_mode(e_shell_get_default())) {
+	if (!e_shell_get_express_mode (shell)) {
 		foreign_view = e_shell_window_get_shell_view (shell_window, "memos");
 		foreign_content = e_shell_view_get_shell_content (foreign_view);
 		g_object_get (foreign_content, "model", &memo_model, NULL);
@@ -358,7 +357,7 @@ cal_shell_content_constructed (GObject *object)
 
 	container = GTK_WIDGET (object);
 	
-	if (!e_shell_get_express_mode(e_shell_get_default())) {
+	if (!e_shell_get_express_mode (shell)) {
 		widget = e_paned_new (GTK_ORIENTATION_HORIZONTAL);
 		gtk_container_add (GTK_CONTAINER (container), widget);
 		priv->hpaned = g_object_ref (widget);
@@ -370,14 +369,14 @@ cal_shell_content_constructed (GObject *object)
 	widget = gtk_notebook_new ();
 	gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), FALSE);
 	gtk_notebook_set_show_border (GTK_NOTEBOOK (widget), FALSE);
-	if (!e_shell_get_express_mode(e_shell_get_default()))	
+	if (!e_shell_get_express_mode (shell))
 		gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE);
 	else
 		gtk_container_add (GTK_CONTAINER (container), widget);
 	priv->notebook = g_object_ref (widget);
 	gtk_widget_show (widget);
 
-	if (!e_shell_get_express_mode(e_shell_get_default())) {
+	if (!e_shell_get_express_mode (shell)) {
 		/* FIXME Need to deal with saving and restoring the position.
 		 *       Month view has its own position. */
 		widget = e_paned_new (GTK_ORIENTATION_VERTICAL);
@@ -409,88 +408,92 @@ cal_shell_content_constructed (GObject *object)
 		priv->notebook, "page");
 
 	container = priv->vpaned;
-if(!e_shell_get_express_mode(e_shell_get_default())) {
-	widget = gtk_vbox_new (FALSE, 0);
-	gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE);
-	gtk_widget_show (widget);
 
-	container = widget;
+	if (!e_shell_get_express_mode (shell)) {
+		widget = gtk_vbox_new (FALSE, 0);
+		gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE);
+		gtk_widget_show (widget);
 
-	widget = gtk_hseparator_new ();
-	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0);
-	gtk_widget_show (widget);
+		container = widget;
 
-	widget = gtk_label_new (NULL);
-	markup = g_strdup_printf ("<b>%s</b>", _("Tasks"));
-	gtk_label_set_markup (GTK_LABEL (widget), markup);
-	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0);
-	gtk_widget_show (widget);
-	g_free (markup);
-
-	widget = gtk_scrolled_window_new (NULL, NULL);
-	gtk_scrolled_window_set_policy (
-		GTK_SCROLLED_WINDOW (widget),
-		GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-	gtk_scrolled_window_set_shadow_type (
-		GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN);
-	gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
-	gtk_widget_show (widget);
+		widget = gtk_hseparator_new ();
+		gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0);
+		gtk_widget_show (widget);
 
-	container = widget;
+		widget = gtk_label_new (NULL);
+		markup = g_strdup_printf ("<b>%s</b>", _("Tasks"));
+		gtk_label_set_markup (GTK_LABEL (widget), markup);
+		gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0);
+		gtk_widget_show (widget);
+		g_free (markup);
+
+		widget = gtk_scrolled_window_new (NULL, NULL);
+		gtk_scrolled_window_set_policy (
+			GTK_SCROLLED_WINDOW (widget),
+			GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+		gtk_scrolled_window_set_shadow_type (
+			GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN);
+		gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
+		gtk_widget_show (widget);
 
-	widget = e_task_table_new (shell_view, task_model);
-	gtk_container_add (GTK_CONTAINER (container), widget);
-	priv->task_table = g_object_ref (widget);
-	gtk_widget_show (widget);
+		container = widget;
 
-	cal_shell_content_load_table_state (shell_content, E_TABLE (widget));
+		widget = e_task_table_new (shell_view, task_model);
+		gtk_container_add (GTK_CONTAINER (container), widget);
+		priv->task_table = g_object_ref (widget);
+		gtk_widget_show (widget);
 
-	g_signal_connect_swapped (
-		widget, "open-component",
-		G_CALLBACK (e_cal_shell_view_taskpad_open_task),
-		shell_view);
+		cal_shell_content_load_table_state (
+			shell_content, E_TABLE (widget));
 
-	container = priv->vpaned;
+		g_signal_connect_swapped (
+			widget, "open-component",
+			G_CALLBACK (e_cal_shell_view_taskpad_open_task),
+			shell_view);
 
-	widget = gtk_vbox_new (FALSE, 0);
-	gtk_paned_pack2 (GTK_PANED (container), widget, TRUE, TRUE);
-	gtk_widget_show (widget);
+		container = priv->vpaned;
 
-	container = widget;
+		widget = gtk_vbox_new (FALSE, 0);
+		gtk_paned_pack2 (GTK_PANED (container), widget, TRUE, TRUE);
+		gtk_widget_show (widget);
 
-	widget = gtk_label_new (NULL);
-	markup = g_strdup_printf ("<b>%s</b>", _("Memos"));
-	gtk_label_set_markup (GTK_LABEL (widget), markup);
-	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0);
-	gtk_widget_show (widget);
-	g_free (markup);
-
-	widget = gtk_scrolled_window_new (NULL, NULL);
-	gtk_scrolled_window_set_policy (
-		GTK_SCROLLED_WINDOW (widget),
-		GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-	gtk_scrolled_window_set_shadow_type (
-		GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN);
-	gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
-	gtk_widget_show (widget);
+		container = widget;
 
-	container = widget;
+		widget = gtk_label_new (NULL);
+		markup = g_strdup_printf ("<b>%s</b>", _("Memos"));
+		gtk_label_set_markup (GTK_LABEL (widget), markup);
+		gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0);
+		gtk_widget_show (widget);
+		g_free (markup);
+
+		widget = gtk_scrolled_window_new (NULL, NULL);
+		gtk_scrolled_window_set_policy (
+			GTK_SCROLLED_WINDOW (widget),
+			GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+		gtk_scrolled_window_set_shadow_type (
+			GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN);
+		gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
+		gtk_widget_show (widget);
 
-	widget = e_memo_table_new (shell_view, memo_model);
-	gtk_container_add (GTK_CONTAINER (container), widget);
-	priv->memo_table = g_object_ref (widget);
-	gtk_widget_show (widget);
+		container = widget;
 
-	cal_shell_content_load_table_state (shell_content, E_TABLE (widget));
+		widget = e_memo_table_new (shell_view, memo_model);
+		gtk_container_add (GTK_CONTAINER (container), widget);
+		priv->memo_table = g_object_ref (widget);
+		gtk_widget_show (widget);
 
-	e_cal_model_set_default_time_func (
-		memo_model, gc_get_default_time, calendar);
+		cal_shell_content_load_table_state (
+			shell_content, E_TABLE (widget));
+
+		e_cal_model_set_default_time_func (
+			memo_model, gc_get_default_time, calendar);
+
+		g_signal_connect_swapped (
+			widget, "open-component",
+			G_CALLBACK (e_cal_shell_view_memopad_open_memo),
+			shell_view);
+	}
 
-	g_signal_connect_swapped (
-		widget, "open-component",
-		G_CALLBACK (e_cal_shell_view_memopad_open_memo),
-		shell_view);
-}
 	/* Load the view instance. */
 
 	view_instance = e_shell_view_new_view_instance (shell_view, NULL);
@@ -502,7 +505,7 @@ if(!e_shell_get_express_mode(e_shell_get_default())) {
 	 *     The GtkWidget::map() callback below explains why. */
 	priv->view_instance = view_instance;
 
-	if (!e_shell_get_express_mode(e_shell_get_default())) {	
+	if (!e_shell_get_express_mode (shell)) {
 		g_signal_connect_swapped (
 			shell_view, "notify::view-id",
 			G_CALLBACK (cal_shell_content_notify_view_id_cb),
diff --git a/plugins/startup-wizard/startup-wizard.c b/plugins/startup-wizard/startup-wizard.c
index 97d2297..77be99f 100644
--- a/plugins/startup-wizard/startup-wizard.c
+++ b/plugins/startup-wizard/startup-wizard.c
@@ -60,17 +60,19 @@ startup_wizard_close (void) {
 void
 startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target)
 {
+	EShell *shell;
 	GtkWidget *start_page;
 	GtkLabel  *start_page_label;
 	GConfClient *client;
 	GSList *accounts;
 	EConfig *config;
 	EMAccountEditor *emae;
-	char *req_view;
+	const gchar *req_view;
 
-	req_view = e_shell_get_startup_view(e_shell_get_default());
+	shell = e_shell_get_default ();
+	req_view = e_shell_get_startup_view (shell);
 
-	if (req_view && strcmp (req_view, "mail") && e_shell_get_express_mode(e_shell_get_default())) {
+	if (req_view && strcmp (req_view, "mail") && e_shell_get_express_mode (shell)) {
 		return;
 	}
 
@@ -86,7 +88,7 @@ startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target)
 		return;
 	}
 
-	if (e_shell_get_express_mode (e_shell_get_default ())) {
+	if (e_shell_get_express_mode (shell)) {
 		start_page = (GtkWidget *)mail_capplet_shell_new (0, TRUE, TRUE);
 		gtk_widget_show (start_page);
 
diff --git a/shell/main.c b/shell/main.c
index 02bc094..f342f35 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -258,7 +258,7 @@ idle_cb (gchar **uris)
 			gtk_main_quit ();
 	} else {
 		if (express_mode && requested_view == NULL)
-			requested_view = "mail";
+			requested_view = (gchar *) "mail";
 		e_shell_create_shell_window (shell, requested_view);
 	}
 
diff --git a/widgets/misc/e-preferences-window.c b/widgets/misc/e-preferences-window.c
index 8fa4fcf..d6ee321 100644
--- a/widgets/misc/e-preferences-window.c
+++ b/widgets/misc/e-preferences-window.c
@@ -108,7 +108,7 @@ preferences_window_selection_changed_cb (EPreferencesWindow *window)
 	if (list == NULL)
 		return;
 
-	model = window->priv->store;
+	model = GTK_TREE_MODEL (window->priv->store);
 	gtk_tree_model_get_iter (model, &iter, list->data);
 	gtk_tree_model_get (model, &iter, COLUMN_PAGE, &page, -1);
 
@@ -405,7 +405,7 @@ e_preferences_window_add_page (EPreferencesWindow *window,
 	notebook = GTK_NOTEBOOK (window->priv->notebook);
 
 	page = gtk_notebook_get_n_pages (notebook);
-	model = window->priv->store;
+	model = GTK_TREE_MODEL (window->priv->store);
 	pixbuf = preferences_window_load_pixbuf (icon_name);
 
 	gtk_list_store_append (GTK_LIST_STORE (model), &iter);
diff --git a/widgets/misc/e-preferences-window.h b/widgets/misc/e-preferences-window.h
index 97f0da8..00b51b8 100644
--- a/widgets/misc/e-preferences-window.h
+++ b/widgets/misc/e-preferences-window.h
@@ -68,8 +68,8 @@ void		e_preferences_window_add_page	(EPreferencesWindow *window,
 						 gint sort_order);
 void		e_preferences_window_show_page	(EPreferencesWindow *window,
 						 const gchar *page_name);
-void		e_preferences_window_filter_page (EPreferencesWindow *window,
-                                  		  const gchar *page_name);
+void		e_preferences_window_filter_page(EPreferencesWindow *window,
+						 const gchar *page_name);
 
 G_END_DECLS
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]