[Goodies-commits] r4036 - in xfce4-mailwatch-plugin/trunk: . panel-plugin

Brian Tarricone kelnos at xfce.org
Wed Mar 12 06:52:56 CET 2008


Author: kelnos
Date: 2008-03-12 05:52:53 +0000 (Wed, 12 Mar 2008)
New Revision: 4036

Modified:
   xfce4-mailwatch-plugin/trunk/configure.ac.in
   xfce4-mailwatch-plugin/trunk/panel-plugin/Makefile.am
   xfce4-mailwatch-plugin/trunk/panel-plugin/mailwatch-plugin.c
Log:
add 'Update Now' menu item (bug 3908), tidy things up a bit


Modified: xfce4-mailwatch-plugin/trunk/configure.ac.in
===================================================================
--- xfce4-mailwatch-plugin/trunk/configure.ac.in	2008-03-12 05:20:51 UTC (rev 4035)
+++ xfce4-mailwatch-plugin/trunk/configure.ac.in	2008-03-12 05:52:53 UTC (rev 4036)
@@ -24,6 +24,7 @@
 
 dnl check for basic programs
 AC_PROG_CC
+AM_PROG_CC_C_O
 AC_PROG_INSTALL
 AC_PROG_LIBTOOL
 AC_PROG_INTLTOOL([0.31], [no-xml])

Modified: xfce4-mailwatch-plugin/trunk/panel-plugin/Makefile.am
===================================================================
--- xfce4-mailwatch-plugin/trunk/panel-plugin/Makefile.am	2008-03-12 05:20:51 UTC (rev 4035)
+++ xfce4-mailwatch-plugin/trunk/panel-plugin/Makefile.am	2008-03-12 05:52:53 UTC (rev 4036)
@@ -82,7 +82,7 @@
 @INTLTOOL_DESKTOP_RULE@
 	
 # get full path into .desktop file
-%.desktop.in: %.desktop.in.in
+.desktop.in: .desktop.in.in
 	sed -e "s^@PLUGIN_PATH@^$(libexecdir)/xfce4/panel-plugins^" \
 		$< > $@
 

Modified: xfce4-mailwatch-plugin/trunk/panel-plugin/mailwatch-plugin.c
===================================================================
--- xfce4-mailwatch-plugin/trunk/panel-plugin/mailwatch-plugin.c	2008-03-12 05:20:51 UTC (rev 4035)
+++ xfce4-mailwatch-plugin/trunk/panel-plugin/mailwatch-plugin.c	2008-03-12 05:52:53 UTC (rev 4036)
@@ -1,6 +1,6 @@
 /*
  *  xfce4-mailwatch-plugin - a mail notification applet for the xfce4 panel
- *  Copyright (c) 2005 Brian Tarricone <bjt23 at cornell.edu>
+ *  Copyright (c) 2005-2008 Brian Tarricone <bjt23 at cornell.edu>
  *  Copyright (c) 2005 Jasper Huijsmans <jasper at xfce.org>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -924,10 +924,19 @@
 }
 
 static void
+mailwatch_update_now_clicked_cb(GtkMenuItem *mi,
+                                gpointer user_data)
+{
+    XfceMailwatchPlugin *mwp = user_data;
+    xfce_mailwatch_force_update(mwp->mailwatch);
+}
+
+static void
 mailwatch_construct(XfcePanelPlugin *plugin)
 {
     XfceMailwatchPlugin *mwp;
-    
+    GtkWidget *mi, *img;
+
     xfce_textdomain(GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
 
     if(!(mwp = mailwatch_create(plugin)))
@@ -948,6 +957,15 @@
     g_signal_connect(plugin, "size-changed", G_CALLBACK(mailwatch_set_size),
                       mwp);
     
+    mi = gtk_image_menu_item_new_with_label(_("Update Now"));
+    img = gtk_image_new_from_stock(GTK_STOCK_REFRESH, GTK_ICON_SIZE_MENU);
+    gtk_widget_show(img);
+    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), img);
+    gtk_widget_show(mi);
+    g_signal_connect(G_OBJECT(mi), "activate",
+                     G_CALLBACK(mailwatch_update_now_clicked_cb), mwp);
+    xfce_panel_plugin_menu_insert_item(plugin, GTK_MENU_ITEM(mi));
+
     xfce_mailwatch_force_update(mwp->mailwatch);
 }
 




More information about the Goodies-commits mailing list