diff options
author | Srinivasa Ragavan <sragavan@gnome.org> | 2010-03-01 13:24:01 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-03-14 09:49:49 +0800 |
commit | b5354ee4b83fa05b38eda85c79ca590ad3f90bff (patch) | |
tree | 34e24ab35670dd8a30426006e66ff7a40eeaf621 | |
parent | c38f7da6ed1eb22494fb989aacbff36414fcdd97 (diff) | |
download | gsoc2013-evolution-b5354ee4b83fa05b38eda85c79ca590ad3f90bff.tar gsoc2013-evolution-b5354ee4b83fa05b38eda85c79ca590ad3f90bff.tar.gz gsoc2013-evolution-b5354ee4b83fa05b38eda85c79ca590ad3f90bff.tar.bz2 gsoc2013-evolution-b5354ee4b83fa05b38eda85c79ca590ad3f90bff.tar.lz gsoc2013-evolution-b5354ee4b83fa05b38eda85c79ca590ad3f90bff.tar.xz gsoc2013-evolution-b5354ee4b83fa05b38eda85c79ca590ad3f90bff.tar.zst gsoc2013-evolution-b5354ee4b83fa05b38eda85c79ca590ad3f90bff.zip |
Libify settings capplet.
-rw-r--r-- | capplet/Makefile.am | 24 | ||||
-rw-r--r-- | capplet/mail-account-view.c | 6 | ||||
-rw-r--r-- | capplet/mail-capplet-shell.c | 16 | ||||
-rw-r--r-- | capplet/mail-settings-view.c | 3 | ||||
-rw-r--r-- | shell/e-shell-settings.c | 12 |
5 files changed, 38 insertions, 23 deletions
diff --git a/capplet/Makefile.am b/capplet/Makefile.am index 829e01d9ac..dd18c3e994 100644 --- a/capplet/Makefile.am +++ b/capplet/Makefile.am @@ -36,8 +36,12 @@ AM_CFLAGS =\ bin_PROGRAMS = evolution-settings +privsolib_LTLIBRARIES = libevolution-mail-settings.la + evolution_settings_SOURCES = \ - anjal-settings-main.c \ + anjal-settings-main.c + +libevolution_mail_settings_la_SOURCES = \ mail-settings-view.c \ mail-settings-view.h \ mail-account-view.c \ @@ -53,7 +57,7 @@ evolution_settings_SOURCES = \ mail-guess-servers.c \ mail-guess-servers.h -evolution_settings_CFLAGS = -DANJAL_SETTINGS +libevolution_mail_settings_la_CFLAGS = -DANJAL_SETTINGS evolution_settings_LDFLAGS = \ -Wl,--export-dynamic @@ -68,5 +72,19 @@ evolution_settings_LDADD = \ $(GNOME_PLATFORM_LIBS) \ $(top_builddir)/widgets/misc/libemiscwidgets.la \ $(top_builddir)/filter/libfilter.la \ - $(top_builddir)/mail/libevolution-mail.la + $(top_builddir)/mail/libevolution-mail.la \ + $(top_builddir)/capplet/libevolution-mail-settings.la + +libevolution_mail_settings_la_LIBADD = \ + $(EVOLUTION_MAIL_LIBS) \ + $(CERT_UI_LIBS) \ + $(CANBERRA_LIBS) \ + $(GTKHTML_LIBS) \ + $(E_WIDGETS_LIBS) \ + $(SMIME_LIBS) \ + $(GNOME_PLATFORM_LIBS) \ + $(top_builddir)/widgets/misc/libemiscwidgets.la \ + $(top_builddir)/filter/libfilter.la \ + $(top_builddir)/mail/libevolution-mail.la + diff --git a/capplet/mail-account-view.c b/capplet/mail-account-view.c index 95838d1b89..94442a98ab 100644 --- a/capplet/mail-account-view.c +++ b/capplet/mail-account-view.c @@ -32,8 +32,6 @@ #include "mail/mail-config.h" #include "mail-guess-servers.h" -extern gboolean anjal_icon_decoration; - struct _MailAccountViewPrivate { GtkWidget *tab_str; }; @@ -542,7 +540,7 @@ mav_construct_page(MailAccountView *view, MAVPageType type) if ((view->original && mail_account_pages[type].prev_edit) || mail_account_pages[type].prev) { box = gtk_hbox_new(FALSE, 0); - if (anjal_icon_decoration) { + if (FALSE) { tmp = gtk_image_new_from_icon_name ("go-previous", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 0); } @@ -558,7 +556,7 @@ mav_construct_page(MailAccountView *view, MAVPageType type) box = gtk_hbox_new(FALSE, 0); tmp = gtk_label_new (_(view->original ? mail_account_pages[type].next_edit : mail_account_pages[type].next)); gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 3); - if (anjal_icon_decoration) { + if (FALSE) { tmp = gtk_image_new_from_icon_name ("go-next", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 0); } diff --git a/capplet/mail-capplet-shell.c b/capplet/mail-capplet-shell.c index 7da60bde7c..5e2cce6e60 100644 --- a/capplet/mail-capplet-shell.c +++ b/capplet/mail-capplet-shell.c @@ -59,8 +59,6 @@ char *scolor_fg_norm; static guint mail_capplet_shell_signals[LAST_SIGNAL]; -extern gboolean windowed; - struct _MailCappletShellPrivate { GtkWidget *box; @@ -241,11 +239,13 @@ static void ms_show_post_druid (MailViewChild *mfv G_GNUC_UNUSED, MailCappletShell *shell) { + gtk_widget_destroy(shell); + /* if (shell->priv->settings_view) mail_view_switch_to_settings ((MailView *)shell->view, (MailViewChild *)shell->priv->settings_view); else { shell->priv->settings_view = mail_view_add_page ((MailView *)shell->view, MAIL_VIEW_SETTINGS, NULL); - } + } */ } @@ -273,7 +273,7 @@ mail_capplet_shell_construct (MailCappletShell *shell, int socket_id) ms_init_style (style); g_signal_connect ((GObject *)shell, "delete-event", G_CALLBACK (ms_delete_event), NULL); gtk_window_set_type_hint ((GtkWindow *)shell, GDK_WINDOW_TYPE_HINT_NORMAL); - if (g_getenv("ANJAL_NO_MAX") == NULL && !windowed) { + if (g_getenv("ANJAL_NO_MAX") == NULL && FALSE) { GdkScreen *scr = gtk_widget_get_screen ((GtkWidget *)shell); window_width = gdk_screen_get_width(scr); gtk_window_set_default_size ((GtkWindow *)shell, gdk_screen_get_width(scr), gdk_screen_get_height (scr)); @@ -291,7 +291,7 @@ mail_capplet_shell_construct (MailCappletShell *shell, int socket_id) priv->top_bar = gtk_toolbar_new (); gtk_box_pack_start ((GtkBox *)priv->box, priv->top_bar, FALSE, FALSE, 0); gtk_widget_show (priv->top_bar); - if (g_getenv("ANJAL_NO_MAX") || windowed) { + if (g_getenv("ANJAL_NO_MAX") || FALSE) { gtk_container_set_border_width (GTK_CONTAINER (shell), 1); g_signal_connect (priv->top_bar, "expose-event", G_CALLBACK (color_expose), @@ -347,7 +347,7 @@ mail_capplet_shell_construct (MailCappletShell *shell, int socket_id) e_mail_store_init (custom_dir); g_free (custom_dir); - if (ms_check_new()) { + if (TRUE) { MailViewChild *mc; char *pdir = g_build_filename (g_get_home_dir(), ".gnome2_private", NULL); @@ -358,9 +358,9 @@ mail_capplet_shell_construct (MailCappletShell *shell, int socket_id) g_mkdir (pdir, 0700); } g_free (pdir); - } else + } /*else shell->priv->settings_view = mail_view_add_page ((MailView *)shell->view, MAIL_VIEW_SETTINGS, NULL); - + */ } diff --git a/capplet/mail-settings-view.c b/capplet/mail-settings-view.c index ca08a41e18..154fd0b319 100644 --- a/capplet/mail-settings-view.c +++ b/capplet/mail-settings-view.c @@ -30,7 +30,6 @@ #include "mail-view.h" #include "mail/mail-config.h" #include <e-util/e-account-utils.h> -extern gboolean anjal_icon_decoration; struct _MailSettingsViewPrivate { GtkWidget *tab_str; @@ -139,7 +138,7 @@ build_account_button (MailSettingsView *acview, EAccount *account) label = gtk_button_new (); tbox = gtk_hbox_new (FALSE, 0); - if (anjal_icon_decoration) { + if (FALSE) { tlabel = (GtkWidget *)gtk_image_new_from_stock (account ? "gtk-edit" : "gtk-new", GTK_ICON_SIZE_BUTTON); gtk_widget_show(tlabel); gtk_box_pack_start((GtkBox *)tbox, tlabel, FALSE, FALSE, 6); diff --git a/shell/e-shell-settings.c b/shell/e-shell-settings.c index ac25d1f9e7..99e1822e68 100644 --- a/shell/e-shell-settings.c +++ b/shell/e-shell-settings.c @@ -54,20 +54,17 @@ shell_settings_pspec_for_key (const gchar *property_name, entry = gconf_client_get_entry (client, gconf_key, NULL, TRUE, &error); if (error != NULL) { - g_error ("%s", error->message); - g_assert_not_reached (); + return NULL; } schema_name = gconf_entry_get_schema_name (entry); if (schema_name == NULL) { - g_error ("No schema for GConf key '%s'", gconf_key); - g_assert_not_reached (); + return NULL; } schema = gconf_client_get_schema (client, schema_name, &error); if (error != NULL) { - g_error ("%s", error->message); - g_assert_not_reached (); + return NULL; } value_type = gconf_schema_get_type (schema); @@ -380,6 +377,9 @@ e_shell_settings_install_property_for_key (const gchar *property_name, g_return_if_fail (gconf_key != NULL); pspec = shell_settings_pspec_for_key (property_name, gconf_key); + if (!pspec) + return; + e_shell_settings_install_property (pspec); for (iter = instances; iter != NULL; iter = iter->next) |