diff options
Diffstat (limited to 'widgets/misc')
-rw-r--r-- | widgets/misc/e-attachment-bar.c | 101 | ||||
-rw-r--r-- | widgets/misc/e-attachment-bar.h | 8 | ||||
-rw-r--r-- | widgets/misc/e-charset-picker.c | 3 | ||||
-rw-r--r-- | widgets/misc/e-charset-picker.h | 1 |
4 files changed, 1 insertions, 112 deletions
diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c index 2da9d3541c..316aa85a0e 100644 --- a/widgets/misc/e-attachment-bar.c +++ b/widgets/misc/e-attachment-bar.c @@ -76,9 +76,6 @@ static GnomeIconListClass *parent_class = NULL; struct _EAttachmentBarPrivate { GtkWidget *attach; /* attachment file dialogue, if active */ - /* Recent documents. Use this widget directly when bonoboui is obsoleted */ - GtkWidget *recent; - gboolean batch_unref; GPtrArray *attachments; char *path; @@ -791,9 +788,6 @@ destroy (GtkObject *object) if (priv->attach) gtk_widget_destroy (priv->attach); - if (priv->recent) - gtk_widget_destroy (priv->recent); - if (priv->path) g_free (priv->path); @@ -1065,14 +1059,6 @@ init (EAttachmentBar *bar) priv->batch_unref = FALSE; priv->attachments = g_ptr_array_new (); - priv->recent = gtk_recent_chooser_menu_new (); - gtk_recent_chooser_menu_set_show_numbers (GTK_RECENT_CHOOSER_MENU (priv->recent), TRUE); - gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (priv->recent), GTK_RECENT_SORT_MRU); - gtk_recent_chooser_set_show_not_found (GTK_RECENT_CHOOSER (priv->recent), FALSE); - gtk_recent_chooser_set_show_private (GTK_RECENT_CHOOSER (priv->recent), FALSE); - gtk_recent_chooser_set_show_icons (GTK_RECENT_CHOOSER (priv->recent), TRUE); - gtk_recent_chooser_set_show_tips (GTK_RECENT_CHOOSER (priv->recent), TRUE); - priv->path = NULL; bar->priv = priv; @@ -1297,7 +1283,6 @@ void e_attachment_bar_refresh (EAttachmentBar *bar) { update (bar); - } int @@ -1352,92 +1337,6 @@ e_attachment_bar_attach_mime_part (EAttachmentBar *bar, CamelMimePart *part) add_from_mime_part (bar, part); } -/* FIXME: Remove this API if nobody uses it */ -void -e_attachment_bar_bonobo_ui_populate_with_recent (BonoboUIComponent *uic, const char *path, - EAttachmentBar *bar, - BonoboUIVerbFn verb_cb, gpointer user_data) -{ - struct _EAttachmentBarPrivate *priv; - GList *items, *l; - gint limit, i; - GString *menuitems; - char *encoded_label, *label; - - g_return_if_fail (E_IS_ATTACHMENT_BAR (bar)); - - priv = bar->priv; - limit = gtk_recent_chooser_get_limit (GTK_RECENT_CHOOSER (priv->recent)); - items = gtk_recent_chooser_get_items (GTK_RECENT_CHOOSER (priv->recent)); - - menuitems = g_string_new ("<submenu"); - g_string_append (menuitems, " name=\"RecentDocsSubmenu\""); - g_string_append_printf (menuitems, " sensitive=\"%s\"", items ? "1" : "0"); - g_string_append_printf (menuitems, " label=\"%s\"", _("Recent _Documents")); - g_string_append (menuitems, ">\n"); - - for (l = g_list_first (items), i = 1; l && i <= limit; l = l->next, ++i) { - GtkRecentInfo *info = ((GtkRecentInfo *)(l->data)); - const gchar *info_dn = gtk_recent_info_get_display_name (info); - char *display_name, *u; - - /* escape _'s in the display name so that it doesn't become an underline in a GtkLabel */ - if ((u = strchr (info_dn, '_'))) { - int extra = 1; - char *d; - const char *s; - - while ((u = strchr (u + 1, '_'))) - extra++; - - d = display_name = g_alloca (strlen (info_dn) + extra + 1); - s = info_dn; - while (*s != '\0') { - if (*s == '_') - *d++ = '_'; - *d++ = *s++; - } - *d = '\0'; - } else - display_name = (char *) info_dn; - - /* Add menu item */ - label = g_strdup (display_name); - encoded_label = bonobo_ui_util_encode_str (label); - g_string_append_printf (menuitems, - " <menuitem name=\"Recent-%d\" verb=\"\" label=\"%s\"/>\n", - i, encoded_label); - g_free (encoded_label); - g_free (label); - } - - g_string_append (menuitems, "</submenu>\n"); - - bonobo_ui_component_set (uic, path, menuitems->str, NULL); - - g_string_free (menuitems, TRUE); - - /* Add uri prop */ - for (l = g_list_first (items), i = 1; l && i <= limit; l = l->next, ++i) { - GtkRecentInfo *info = ((GtkRecentInfo *)(l->data)); - const gchar *info_uri = gtk_recent_info_get_uri (info); - label = g_strdup_printf ("/commands/Recent-%d", i); - bonobo_ui_component_set_prop (uic, label, "uri", info_uri, NULL); - g_free (label); - } - - /* Add verb */ - for (l = g_list_first (items), i = 1; l && i <= limit; l = l->next, ++i) { - label = g_strdup_printf ("Recent-%d", i); - bonobo_ui_component_add_verb (uic, label, verb_cb, user_data); - g_free (label); - } - - for (l = g_list_first (items); l; l = l->next) - gtk_recent_info_unref ((GtkRecentInfo *)(l->data)); - g_list_free (items); -} - static void action_recent_cb (GtkAction *action, EAttachmentBar *attachment_bar) diff --git a/widgets/misc/e-attachment-bar.h b/widgets/misc/e-attachment-bar.h index 7f8b4795d1..363b7f0fb8 100644 --- a/widgets/misc/e-attachment-bar.h +++ b/widgets/misc/e-attachment-bar.h @@ -24,11 +24,9 @@ #ifndef __E_ATTACHMENT_BAR_H__ #define __E_ATTACHMENT_BAR_H__ +#include <gtk/gtk.h> #include <libgnomeui/gnome-icon-list.h> -#include <bonobo/bonobo-ui-node.h> -#include <bonobo/bonobo-ui-util.h> - #include <camel/camel-multipart.h> #include "e-attachment.h" @@ -85,10 +83,6 @@ GSList *e_attachment_bar_get_selected (EAttachmentBar *bar); void e_attachment_bar_set_width(EAttachmentBar *bar, int bar_width); GSList * e_attachment_bar_get_all_attachments (EAttachmentBar *bar); void e_attachment_bar_create_attachment_cache (EAttachment *attachment); -void -e_attachment_bar_bonobo_ui_populate_with_recent (BonoboUIComponent *uic, const char *path, - EAttachmentBar *bar, - BonoboUIVerbFn verb_cb, gpointer user_data); GtkAction * e_attachment_bar_recent_action_new (EAttachmentBar *bar, const gchar *action_name, diff --git a/widgets/misc/e-charset-picker.c b/widgets/misc/e-charset-picker.c index ade1c186a6..6b30b3b11c 100644 --- a/widgets/misc/e-charset-picker.c +++ b/widgets/misc/e-charset-picker.c @@ -31,9 +31,6 @@ #include <glib/gi18n-lib.h> -#include <bonobo/bonobo-ui-node.h> -#include <bonobo/bonobo-ui-util.h> - typedef enum { E_CHARSET_UNKNOWN, E_CHARSET_ARABIC, diff --git a/widgets/misc/e-charset-picker.h b/widgets/misc/e-charset-picker.h index 21643ccf99..1521a2dbb0 100644 --- a/widgets/misc/e-charset-picker.h +++ b/widgets/misc/e-charset-picker.h @@ -22,7 +22,6 @@ #define E_CHARSETPICKER_H #include <gtk/gtk.h> -#include <bonobo/bonobo-ui-component.h> G_BEGIN_DECLS |