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:
parent
cb26efea4e
commit
c06dae67d1
4 changed files with 27 additions and 28 deletions
|
@ -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>
|
2005-11-14 Kjartan Maraas <kmaraas@gnome.org>
|
||||||
|
|
||||||
* drw-selection.h: ANSIfy function declaration.
|
* drw-selection.h: ANSIfy function declaration.
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <gdk/gdkkeysyms.h>
|
#include <gdk/gdkkeysyms.h>
|
||||||
#include <gconf/gconf-client.h>
|
#include <gconf/gconf-client.h>
|
||||||
|
|
||||||
#include "drwright.h"
|
#include "drwright.h"
|
||||||
#include "drw-utils.h"
|
#include "drw-utils.h"
|
||||||
#include "drw-break-window.h"
|
#include "drw-break-window.h"
|
||||||
|
|
|
@ -21,22 +21,16 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include "drwright.h"
|
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
#include <gdk/gdkkeysyms.h>
|
#include <gdk/gdkkeysyms.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <libgnomeui/gnome-stock-icons.h>
|
|
||||||
#include <libgnomeui/gnome-client.h>
|
|
||||||
|
|
||||||
#include <gconf/gconf-client.h>
|
#include <gconf/gconf-client.h>
|
||||||
|
|
||||||
|
#include "drwright.h"
|
||||||
#include "drw-break-window.h"
|
#include "drw-break-window.h"
|
||||||
#include "drw-monitor.h"
|
#include "drw-monitor.h"
|
||||||
#include "drw-utils.h"
|
#include "drw-utils.h"
|
||||||
|
@ -139,7 +133,7 @@ static GList * create_secondary_break_windows (void);
|
||||||
static GtkItemFactoryEntry popup_items[] = {
|
static GtkItemFactoryEntry popup_items[] = {
|
||||||
/* { N_("/_Enabled"), NULL, GIF_CB (popup_enabled_cb), POPUP_ITEM_ENABLED, "<ToggleItem>", NULL },*/
|
/* { 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_("/_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 },
|
{ "/sep1", NULL, NULL, 0, "<Separator>", NULL },
|
||||||
{ N_("/_Take a Break"), NULL, GIF_CB (popup_break_cb), POPUP_ITEM_BREAK, "<Item>", 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,
|
guint action,
|
||||||
GtkWidget *widget)
|
GtkWidget *widget)
|
||||||
{
|
{
|
||||||
DrWright *dr = callback_data;
|
DrWright *dr = callback_data;
|
||||||
|
|
||||||
if (dr->enabled) {
|
if (dr->enabled) {
|
||||||
dr->state = STATE_BREAK_SETUP;
|
dr->state = STATE_BREAK_SETUP;
|
||||||
|
|
|
@ -21,10 +21,11 @@
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <glib/gi18n.h>
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <libgnomeui/libgnomeui.h>
|
#include <libgnomeui/libgnomeui.h>
|
||||||
#include <libgnome/gnome-i18n.h>
|
|
||||||
#include "drw-selection.h"
|
#include "drw-selection.h"
|
||||||
#include "drwright.h"
|
#include "drwright.h"
|
||||||
|
|
||||||
|
@ -85,29 +86,22 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
selection = drw_selection_start ();
|
selection = drw_selection_start ();
|
||||||
if (!drw_selection_is_master (selection)) {
|
if (!drw_selection_is_master (selection)) {
|
||||||
GtkWidget *dialog;
|
g_message ("The typing monitor is already running, exiting.");
|
||||||
|
|
||||||
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));
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!no_check && !have_tray ()) {
|
if (!no_check && !have_tray ()) {
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
|
|
||||||
dialog = gtk_message_dialog_new (NULL, 0,
|
dialog = gtk_message_dialog_new (
|
||||||
GTK_MESSAGE_INFO,
|
NULL, 0,
|
||||||
GTK_BUTTONS_CLOSE,
|
GTK_MESSAGE_INFO,
|
||||||
_("The typing monitor uses the notification area to display "
|
GTK_BUTTONS_CLOSE,
|
||||||
"information. You don't seem to have a notification area "
|
_("The typing monitor uses the notification area to display "
|
||||||
"on your panel. You can add it by right-clicking on your "
|
"information. You don't seem to have a notification area "
|
||||||
"panel and choosing 'Add to panel', selecting 'Notification "
|
"on your panel. You can add it by right-clicking on your "
|
||||||
"area' and clicking 'Add'."));
|
"panel and choosing 'Add to panel', selecting 'Notification "
|
||||||
|
"area' and clicking 'Add'."));
|
||||||
|
|
||||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue