Mercurial > pidgin
diff plugins/docklet/docklet.c @ 12688:473c23442a36
[gaim-migrate @ 15031]
Add the notion of "popular" saved statuses. This lets us show 6 recently
used/popular statuses in the context menu for the docklet.
Eventually I'll add the same list to the status box--but that's a little
more work. If someone else wants to tackle it before I have a chance to
feel free (and let me know!)
Does this look ok to everyone (the docklet menu changes)? Would it
be better if it was a submenu? Or if it was labeled? It'd be cool
if the icons reflected the status.
Oh, and I just remembered that the menu items don't actually work yet...
but that's not too hard, I think I can get to that tonight
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 03 Jan 2006 01:25:06 +0000 |
parents | 03153fbbed55 |
children | d03afaccd41c |
line wrap: on
line diff
--- a/plugins/docklet/docklet.c Tue Jan 03 01:19:32 2006 +0000 +++ b/plugins/docklet/docklet.c Tue Jan 03 01:25:06 2006 +0000 @@ -367,6 +367,7 @@ docklet_menu() { static GtkWidget *menu = NULL; GtkWidget *menuitem; + GList *popular_statuses, *cur; if (menu) { gtk_widget_destroy(menu); @@ -409,6 +410,18 @@ gaim_separator(menu); + popular_statuses = gaim_savedstatuses_get_popular(6); + for (cur = popular_statuses; cur != NULL; cur = cur->next) + { + GaimSavedStatus *saved_status = cur->data; + gaim_new_item_from_stock(menu, + gaim_savedstatus_get_title(saved_status), + GAIM_STOCK_ICON_AWAY, NULL /* TODO */, NULL, 0, 0, NULL); + } + g_list_free(popular_statuses); + + gaim_separator(menu); + gaim_new_item_from_stock(menu, _("Accounts"), GAIM_STOCK_ACCOUNTS, G_CALLBACK(gaim_gtk_accounts_window_show), NULL, 0, 0, NULL); gaim_new_item_from_stock(menu, _("Plugins"), GAIM_STOCK_PLUGIN, G_CALLBACK(gaim_gtk_plugin_dialog_show), NULL, 0, 0, NULL); gaim_new_item_from_stock(menu, _("Preferences"), GTK_STOCK_PREFERENCES, G_CALLBACK(gaim_gtk_prefs_show), NULL, 0, 0, NULL);