Don't display a dialog when the monitor is already running, that's an old

2005-11-27  Richard Hult  <richard@imendio.com>

	* main.c: (main): Don't display a dialog when the monitor is
	already running, that's an old remain from when drwright was a
	standalone app. Fixes bug #307425.

	* drw-break-window.c:
	* drwright.c: (popup_break_cb): Use stock icon from GTK+ instead
	of libgnomeui and use i18n includes from glib. Fixes bug #171664.
This commit is contained in:
Richard Hult 2005-11-27 12:30:11 +00:00 committed by Richard Hult
parent cb26efea4e
commit c06dae67d1
4 changed files with 27 additions and 28 deletions

View file

@ -1,3 +1,13 @@
2005-11-27 Richard Hult <richard@imendio.com>
* main.c: (main): Don't display a dialog when the monitor is
already running, that's an old remain from when drwright was a
standalone app. Fixes bug #307425.
* drw-break-window.c:
* drwright.c: (popup_break_cb): Use stock icon from GTK+ instead
of libgnomeui and use i18n includes from glib. Fixes bug #171664.
2005-11-14 Kjartan Maraas <kmaraas@gnome.org>
* drw-selection.h: ANSIfy function declaration.

View file

@ -27,6 +27,7 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <gconf/gconf-client.h>
#include "drwright.h"
#include "drw-utils.h"
#include "drw-break-window.h"

View file

@ -21,22 +21,16 @@
*/
#include <config.h>
#include "drwright.h"
#include <time.h>
#include <string.h>
#include <math.h>
#include <glib/gi18n.h>
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <libgnomeui/gnome-stock-icons.h>
#include <libgnomeui/gnome-client.h>
#include <gconf/gconf-client.h>
#include "drwright.h"
#include "drw-break-window.h"
#include "drw-monitor.h"
#include "drw-utils.h"
@ -139,7 +133,7 @@ static GList * create_secondary_break_windows (void);
static GtkItemFactoryEntry popup_items[] = {
/* { N_("/_Enabled"), NULL, GIF_CB (popup_enabled_cb), POPUP_ITEM_ENABLED, "<ToggleItem>", NULL },*/
{ N_("/_Preferences"), NULL, GIF_CB (popup_preferences_cb), 0, "<StockItem>", GTK_STOCK_PREFERENCES },
{ N_("/_About"), NULL, GIF_CB (popup_about_cb), 0, "<StockItem>", GNOME_STOCK_ABOUT },
{ N_("/_About"), NULL, GIF_CB (popup_about_cb), 0, "<StockItem>", GTK_STOCK_ABOUT },
{ "/sep1", NULL, NULL, 0, "<Separator>", NULL },
{ N_("/_Take a Break"), NULL, GIF_CB (popup_break_cb), POPUP_ITEM_BREAK, "<Item>", NULL }
};
@ -560,7 +554,7 @@ popup_break_cb (gpointer callback_data,
guint action,
GtkWidget *widget)
{
DrWright *dr = callback_data;
DrWright *dr = callback_data;
if (dr->enabled) {
dr->state = STATE_BREAK_SETUP;

View file

@ -21,10 +21,11 @@
#include <config.h>
#include <string.h>
#include <glib/gi18n.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#include <libgnomeui/libgnomeui.h>
#include <libgnome/gnome-i18n.h>
#include "drw-selection.h"
#include "drwright.h"
@ -85,29 +86,22 @@ main (int argc, char *argv[])
selection = drw_selection_start ();
if (!drw_selection_is_master (selection)) {
GtkWidget *dialog;
dialog = gtk_message_dialog_new (NULL, 0,
GTK_MESSAGE_INFO,
GTK_BUTTONS_CLOSE,
_("The typing monitor is already running."));
gtk_dialog_run (GTK_DIALOG (dialog));
g_message ("The typing monitor is already running, exiting.");
return 0;
}
if (!no_check && !have_tray ()) {
GtkWidget *dialog;
dialog = gtk_message_dialog_new (NULL, 0,
GTK_MESSAGE_INFO,
GTK_BUTTONS_CLOSE,
_("The typing monitor uses the notification area to display "
"information. You don't seem to have a notification area "
"on your panel. You can add it by right-clicking on your "
"panel and choosing 'Add to panel', selecting 'Notification "
"area' and clicking 'Add'."));
dialog = gtk_message_dialog_new (
NULL, 0,
GTK_MESSAGE_INFO,
GTK_BUTTONS_CLOSE,
_("The typing monitor uses the notification area to display "
"information. You don't seem to have a notification area "
"on your panel. You can add it by right-clicking on your "
"panel and choosing 'Add to panel', selecting 'Notification "
"area' and clicking 'Add'."));
gtk_dialog_run (GTK_DIALOG (dialog));