diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-12-11 02:30:29 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-12-11 02:30:29 +0800 |
commit | d158af8cdfa6e4bf85c1e74769e8d61bc469494c (patch) | |
tree | ba55b970ae3a23e5ade4edbddc4eb8dcaf3033bd /e-util | |
parent | dc0d0ee010319425b19d8d8d493f0bc489d5fd07 (diff) | |
download | gsoc2013-evolution-d158af8cdfa6e4bf85c1e74769e8d61bc469494c.tar gsoc2013-evolution-d158af8cdfa6e4bf85c1e74769e8d61bc469494c.tar.gz gsoc2013-evolution-d158af8cdfa6e4bf85c1e74769e8d61bc469494c.tar.bz2 gsoc2013-evolution-d158af8cdfa6e4bf85c1e74769e8d61bc469494c.tar.lz gsoc2013-evolution-d158af8cdfa6e4bf85c1e74769e8d61bc469494c.tar.xz gsoc2013-evolution-d158af8cdfa6e4bf85c1e74769e8d61bc469494c.tar.zst gsoc2013-evolution-d158af8cdfa6e4bf85c1e74769e8d61bc469494c.zip |
Merge revisions 36811:36865 from trunk.
svn path=/branches/kill-bonobo/; revision=36867
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/ChangeLog | 39 | ||||
-rw-r--r-- | e-util/e-config.c | 4 | ||||
-rw-r--r-- | e-util/e-util-labels.c | 37 | ||||
-rw-r--r-- | e-util/e-util-labels.h | 2 | ||||
-rw-r--r-- | e-util/e-util.c | 45 | ||||
-rw-r--r-- | e-util/e-util.h | 3 | ||||
-rw-r--r-- | e-util/gconf-bridge.c | 5 |
7 files changed, 133 insertions, 2 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 461861d7c3..2cc9357c29 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,42 @@ +2008-12-10 Matthew Barnes <mbarnes@redhat.com> + + ** Fixes part of bug #563250 + + * e-util.c (e_get_accels_filename): + New function returns the filename where custom keyboard + accelerators are stored. Currently only applies to the + various editor windows in Evolution. + +2008-12-10 Milan Crha <mcrha@redhat.com> + + ** Part of fix for bug #563870 + + * e-util-labels.h: (e_util_labels_get_filter_options): + * e-util-labels.c: (e_util_labels_get_filter_options): + New helper function to be used in FilterOption. + +2008-12-09 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #555663 + + * gconf-bridge.c: (struct WindowBinding), (gconf_bridge_bind_window), + (window_binding_unbind): Do not overwrite signal id. + +2008-12-05 Milan Crha <mcrha@redhat.com> + + ** Part of fix for bug #332629 + + * e-util.h: (e_util_get_category_filter_options): + * e-util.c: (e_util_get_category_filter_options): + New helper function to be used in FilterOption. + +2008-11-27 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #332729 + + * e-config.c: (ep_finalise): Disconnect handlers on the widget before + freeing the structure it is using. + 2008-11-12 Milan Crha <mcrha@redhat.com> ** Fix for bug #559810 diff --git a/e-util/e-config.c b/e-util/e-config.c index d320bcd7af..03a553feb2 100644 --- a/e-util/e-config.c +++ b/e-util/e-config.c @@ -122,6 +122,10 @@ ep_finalise(GObject *o) } while ( (wn = (struct _widget_node *)e_dlist_remhead(&p->widgets)) ) { + /* disconnect the gtk_widget_destroyed function from the widget */ + if (wn->widget) + g_signal_handlers_disconnect_matched (wn->widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, &wn->widget); + g_free(wn); } diff --git a/e-util/e-util-labels.c b/e-util/e-util-labels.c index da32f233c5..88fff080b7 100644 --- a/e-util/e-util-labels.c +++ b/e-util/e-util-labels.c @@ -29,8 +29,10 @@ #include <camel/camel-utf8.h> +#include "e-util.h" #include "e-util-labels.h" #include "e-dialog-utils.h" +#include "filter/filter-option.h" /* Note, the first element of each EUtilLabel must NOT be translated */ EUtilLabel label_defaults[LABEL_DEFAULTS_NUM] = { @@ -543,3 +545,38 @@ e_util_labels_get_color_str (GSList *labels, const char *tag) return label->colour; } + +/** + * e_util_labels_get_filter_options: + * Returns list of newly allocated struct _filter_option-s, to be used in filters. + **/ +GSList * +e_util_labels_get_filter_options (void) +{ + GSList *known = e_util_labels_parse (NULL), *l; + GSList *res = NULL; + + for (l = known; l; l = l->next) { + EUtilLabel *label = l->data; + const char *tag; + struct _filter_option *fo; + + if (!label) + continue; + + tag = label->tag; + + if (tag && strncmp (tag, "$Label", 6) == 0) + tag += 6; + + fo = g_new0 (struct _filter_option, 1); + fo->title = e_str_without_underscores (label->name); + fo->value = g_strdup (tag); + + res = g_slist_prepend (res, fo); + } + + e_util_labels_free (known); + + return g_slist_reverse (res); +} diff --git a/e-util/e-util-labels.h b/e-util/e-util-labels.h index a9dd5613bc..26520ff226 100644 --- a/e-util/e-util-labels.h +++ b/e-util/e-util-labels.h @@ -52,4 +52,6 @@ const char *e_util_labels_get_name (GSList *labels, const char *tag); gboolean e_util_labels_get_color (GSList *labels, const char *tag, GdkColor *color); const char *e_util_labels_get_color_str (GSList *labels, const char *tag); +GSList * e_util_labels_get_filter_options (void); + #endif /* _E_UTIL_LABELS_H */ diff --git a/e-util/e-util.c b/e-util/e-util.c index adfd7bf807..373002d4d9 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -39,13 +39,15 @@ #include <glib/gi18n.h> #include <glib/gstdio.h> #include <libgnome/gnome-help.h> -#include <libgnome/gnome-util.h> +#include <libgnome/gnome-init.h> #ifdef G_OS_WIN32 #include <windows.h> #endif #include <libedataserver/e-data-server-util.h> +#include <libedataserver/e-categories.h> +#include "filter/filter-option.h" #include "e-util.h" #include "e-util-private.h" @@ -70,6 +72,27 @@ e_get_user_data_dir (void) } /** + * e_get_accels_filename: + * + * Returns the name of the user data file containing custom keyboard + * accelerator specifications. + * + * Returns: filename for accelerator specifications + **/ +const gchar * +e_get_accels_filename (void) +{ + static gchar *filename = NULL; + + if (G_UNLIKELY (filename == NULL)) + filename = g_build_filename ( + gnome_user_dir_get (), + "accels", PACKAGE, NULL); + + return filename; +} + +/** * e_display_help: * @parent: a parent #GtkWindow or %NULL * @link_id: help section to present or %NULL @@ -1282,3 +1305,23 @@ e_util_read_file (const char *filename, gboolean filename_is_uri, char **buffer, return res; } +GSList * +e_util_get_category_filter_options (void) +{ + GSList *res = NULL; + GList *clist, *l; + + clist = e_categories_get_list (); + for (l = clist; l; l = l->next) { + const char *cname = l->data; + struct _filter_option *fo = g_new0 (struct _filter_option, 1); + + fo->title = g_strdup (cname); + fo->value = g_strdup (cname); + res = g_slist_prepend (res, fo); + } + + g_list_free (clist); + + return g_slist_reverse (res); +} diff --git a/e-util/e-util.h b/e-util/e-util.h index 44fbb811cf..4878178ec6 100644 --- a/e-util/e-util.h +++ b/e-util/e-util.h @@ -41,6 +41,7 @@ typedef enum { } EFocus; const gchar * e_get_user_data_dir (void); +const gchar * e_get_accels_filename (void); void e_display_help (GtkWindow *parent, const gchar *link_id); guint e_load_ui_definition (GtkUIManager *ui_manager, @@ -129,6 +130,8 @@ gboolean e_util_read_file (const gchar *filename, gsize *read, GError **error); +GSList *e_util_get_category_filter_options (void); + G_END_DECLS #endif /* _E_UTIL_H_ */ diff --git a/e-util/gconf-bridge.c b/e-util/gconf-bridge.c index 5135eb1d30..451b7052cb 100644 --- a/e-util/gconf-bridge.c +++ b/e-util/gconf-bridge.c @@ -70,6 +70,7 @@ typedef struct { GtkWindow *window; gulong configure_event_id; + gulong window_state_event_id; gulong unmap_id; guint sync_timeout_id; } WindowBinding; @@ -819,7 +820,7 @@ gconf_bridge_bind_window (GConfBridge *bridge, (window_binding_configure_event_cb), binding); - binding->configure_event_id = + binding->window_state_event_id = g_signal_connect (window, "window_state_event", G_CALLBACK @@ -857,6 +858,8 @@ window_binding_unbind (WindowBinding *binding) g_signal_handler_disconnect (binding->window, binding->configure_event_id); g_signal_handler_disconnect (binding->window, + binding->window_state_event_id); + g_signal_handler_disconnect (binding->window, binding->unmap_id); g_object_weak_unref (G_OBJECT (binding->window), |