add properties dialog, #118323 =
Thu Jul 31 17:41:45 2003 Jonathan Blandford <jrb@redhat.com> * drwright.c (popup_preferences_cb): add properties dialog, #118323 =
This commit is contained in:
parent
0e60a77a53
commit
15636387f4
2 changed files with 28 additions and 54 deletions
13
typing-break/ChangeLog
Normal file
13
typing-break/ChangeLog
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
Thu Jul 31 17:41:45 2003 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
|
* drwright.c (popup_preferences_cb): add properties dialog,
|
||||||
|
#118323
|
||||||
|
|
||||||
|
Thu Jul 31 14:56:41 2003 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
|
* drwright.c (popup_quit_cb): remove bogus popup_quit code.
|
||||||
|
|
||||||
|
Thu Jul 31 14:56:13 2003 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
|
* ChangeLog: Started a new ChangeLog for the typing break.
|
||||||
|
|
|
@ -118,11 +118,6 @@ static void popup_break_cb (gpointer callback_data,
|
||||||
static void popup_preferences_cb (gpointer callback_data,
|
static void popup_preferences_cb (gpointer callback_data,
|
||||||
guint action,
|
guint action,
|
||||||
GtkWidget *widget);
|
GtkWidget *widget);
|
||||||
#if 0
|
|
||||||
static void popup_quit_cb (gpointer callback_data,
|
|
||||||
guint action,
|
|
||||||
GtkWidget *widget);
|
|
||||||
#endif
|
|
||||||
static void popup_about_cb (gpointer callback_data,
|
static void popup_about_cb (gpointer callback_data,
|
||||||
guint action,
|
guint action,
|
||||||
GtkWidget *widget);
|
GtkWidget *widget);
|
||||||
|
@ -139,8 +134,6 @@ static GtkItemFactoryEntry popup_items[] = {
|
||||||
{ N_("/_About"), NULL, GIF_CB (popup_about_cb), 0, "<StockItem>", GNOME_STOCK_ABOUT },
|
{ N_("/_About"), NULL, GIF_CB (popup_about_cb), 0, "<StockItem>", GNOME_STOCK_ABOUT },
|
||||||
{ "/sep1", NULL, 0, 0, "<Separator>", NULL },
|
{ "/sep1", NULL, 0, 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 }
|
||||||
/* { "/sep2", NULL, 0, 0, "<Separator>", NULL },
|
|
||||||
{ N_("/_Remove Icon"), "", GIF_CB (popup_quit_cb), 0, "<StockItem>", GTK_STOCK_REMOVE }*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GConfClient *client = NULL;
|
GConfClient *client = NULL;
|
||||||
|
@ -571,58 +564,26 @@ popup_preferences_cb (gpointer callback_data,
|
||||||
guint action,
|
guint action,
|
||||||
GtkWidget *widget)
|
GtkWidget *widget)
|
||||||
{
|
{
|
||||||
/* Bring up gnome-keyboard-properties on the right page */
|
GError *error = NULL;
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
/* FIXME: Needs multi-head/screen support */
|
||||||
static void
|
if (!g_spawn_command_line_async ("gnome-keyboard-properties --typing-break", &error)) {
|
||||||
popup_quit_cb (gpointer callback_data,
|
GtkWidget *error_dialog;
|
||||||
guint action,
|
|
||||||
GtkWidget *widget)
|
|
||||||
{
|
|
||||||
GtkWidget *dialog;
|
|
||||||
gchar *str;
|
|
||||||
gint response;
|
|
||||||
GnomeClient *client;
|
|
||||||
|
|
||||||
str = g_strdup_printf ("<b>%s</b>\n%s",
|
error_dialog = gtk_message_dialog_new (NULL, 0,
|
||||||
_("Quit DrWright?"),
|
GTK_MESSAGE_ERROR,
|
||||||
_("Don't forget to take regular breaks."));
|
GTK_BUTTONS_CLOSE,
|
||||||
|
_("Unable to bring up the typing break properties dialog with the following error: %s"),
|
||||||
dialog = gtk_message_dialog_new (NULL,
|
error->message);
|
||||||
0,
|
g_signal_connect (G_OBJECT (error_dialog),
|
||||||
GTK_MESSAGE_QUESTION,
|
"response",
|
||||||
GTK_BUTTONS_NONE,
|
G_CALLBACK (gtk_widget_destroy), NULL);
|
||||||
str);
|
gtk_window_set_resizable (GTK_WINDOW (error_dialog), FALSE);
|
||||||
|
gtk_widget_show (error_dialog);
|
||||||
|
|
||||||
g_free (str);
|
g_error_free (error);
|
||||||
|
|
||||||
gtk_dialog_add_button (GTK_DIALOG (dialog),
|
|
||||||
_("Don't Quit"),
|
|
||||||
GTK_RESPONSE_NO);
|
|
||||||
|
|
||||||
gtk_dialog_add_button (GTK_DIALOG (dialog),
|
|
||||||
_("Quit"),
|
|
||||||
GTK_RESPONSE_YES);
|
|
||||||
|
|
||||||
g_object_set (GTK_MESSAGE_DIALOG (dialog)->label,
|
|
||||||
"use-markup", TRUE,
|
|
||||||
"wrap", TRUE,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
response = gtk_dialog_run (GTK_DIALOG (dialog));
|
|
||||||
if (response != GTK_RESPONSE_DELETE_EVENT) {
|
|
||||||
gtk_widget_destroy (dialog);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (response == GTK_RESPONSE_YES) {
|
|
||||||
client = gnome_master_client ();
|
|
||||||
gnome_client_set_restart_style (client, GNOME_RESTART_NEVER);
|
|
||||||
|
|
||||||
gtk_main_quit ();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
popup_about_cb (gpointer callback_data,
|
popup_about_cb (gpointer callback_data,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue