mirror of
https://github.com/moparisthebest/FireTray
synced 2024-11-10 19:15:08 -05:00
add icons to new menu items
This commit is contained in:
parent
24941550c0
commit
0952430996
@ -121,7 +121,7 @@ firetray.Handler = {
|
|||||||
case "mail-startup-done":
|
case "mail-startup-done":
|
||||||
case "final-ui-startup":
|
case "final-ui-startup":
|
||||||
LOG("RECEIVED: "+topic+", launching timer");
|
LOG("RECEIVED: "+topic+", launching timer");
|
||||||
// sessionstore-windows-restored does not come after the realisation of
|
// sessionstore-windows-restored does not come after the realization of
|
||||||
// all windows... so we wait a little
|
// all windows... so we wait a little
|
||||||
var timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
var timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||||
timer.initWithCallback(function() {
|
timer.initWithCallback(function() {
|
||||||
|
@ -73,6 +73,9 @@ firetray.StatusIcon = {
|
|||||||
var menuItemNewWindowLabel = firetray.Utils.strings.GetStringFromName("popupMenu.itemLabel.NewWindow");
|
var menuItemNewWindowLabel = firetray.Utils.strings.GetStringFromName("popupMenu.itemLabel.NewWindow");
|
||||||
var menuItemNewWindow = gtk.gtk_image_menu_item_new_with_label(
|
var menuItemNewWindow = gtk.gtk_image_menu_item_new_with_label(
|
||||||
menuItemNewWindowLabel);
|
menuItemNewWindowLabel);
|
||||||
|
var menuItemNewWindowIcon = gtk.gtk_image_new_from_stock(
|
||||||
|
"gtk-new", gtk.GTK_ICON_SIZE_MENU);
|
||||||
|
gtk.gtk_image_menu_item_set_image(menuItemNewWindow, menuItemNewWindowIcon);
|
||||||
gtk.gtk_menu_shell_append(menuShell, ctypes.cast(menuItemNewWindow, gtk.GtkWidget.ptr));
|
gtk.gtk_menu_shell_append(menuShell, ctypes.cast(menuItemNewWindow, gtk.GtkWidget.ptr));
|
||||||
|
|
||||||
this.callbacks.menuItemNewWindowActivate = gobject.GCallback_t(
|
this.callbacks.menuItemNewWindowActivate = gobject.GCallback_t(
|
||||||
@ -87,6 +90,9 @@ firetray.StatusIcon = {
|
|||||||
var menuItemNewMessageLabel = firetray.Utils.strings.GetStringFromName("popupMenu.itemLabel.NewMessage");
|
var menuItemNewMessageLabel = firetray.Utils.strings.GetStringFromName("popupMenu.itemLabel.NewMessage");
|
||||||
var menuItemNewMessage = gtk.gtk_image_menu_item_new_with_label(
|
var menuItemNewMessage = gtk.gtk_image_menu_item_new_with_label(
|
||||||
menuItemNewMessageLabel);
|
menuItemNewMessageLabel);
|
||||||
|
var menuItemNewMessageIcon = gtk.gtk_image_new_from_stock(
|
||||||
|
"gtk-edit", gtk.GTK_ICON_SIZE_MENU);
|
||||||
|
gtk.gtk_image_menu_item_set_image(menuItemNewMessage, menuItemNewMessageIcon);
|
||||||
gtk.gtk_menu_shell_append(menuShell, ctypes.cast(menuItemNewMessage, gtk.GtkWidget.ptr));
|
gtk.gtk_menu_shell_append(menuShell, ctypes.cast(menuItemNewMessage, gtk.GtkWidget.ptr));
|
||||||
|
|
||||||
this.callbacks.menuItemNewMessageActivate = gobject.GCallback_t(
|
this.callbacks.menuItemNewMessageActivate = gobject.GCallback_t(
|
||||||
|
Loading…
Reference in New Issue
Block a user