diff --git a/typing-break/ChangeLog b/typing-break/ChangeLog index 34c4abde4..25b2b3222 100644 --- a/typing-break/ChangeLog +++ b/typing-break/ChangeLog @@ -1,3 +1,13 @@ +2007-01-09 Vincent Untz + + * main.c: (main): set default window icon and application name + * Makefile.am: install icons + * drwright.c: (popup_about_cb): use gtk_about_dialog_show() + * typing-monitor.png: + * typing-monitor.svn: new + Fix bug #348641, icon by Andreas Nilsson , patch + by Luca Cavalli + 2006-11-15 Kjartan Maraas * Makefile.am: Don't redefine GNOMELOCALEDIR. diff --git a/typing-break/Makefile.am b/typing-break/Makefile.am index 83ce8a547..f4fead043 100644 --- a/typing-break/Makefile.am +++ b/typing-break/Makefile.am @@ -23,4 +23,21 @@ gnome_typing_monitor_LDFLAGS = -export-dynamic imagedir = $(GNOMECC_PIXMAPS_DIR) image_DATA = stop.png bar.png bar-red.png bar-green.png bar-disabled.png ocean-stripes.png -EXTRA_DIST = $(image_DATA) +# Themeable application icon +icondir = $(datadir)/icons/hicolor/48x48/apps +icon_DATA = typing-monitor.png +svgicondir = $(datadir)/icons/hicolor/scalable/apps +svgicon_DATA = typing-monitor.svg +gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor +install-data-hook: + @-if test -z "$(DESTDIR)"; then \ + echo "Updating Gtk icon cache."; \ + $(gtk_update_icon_cache); \ + else \ + echo "*** Icon cache not updated. After install, run this:"; \ + echo "*** $(gtk_update_icon_cache)"; \ + fi + +EXTRA_DIST = $(image_DATA) \ + $(icon_DATA) \ + $(svgicon_DATA) diff --git a/typing-break/drwright.c b/typing-break/drwright.c index a0e0f0e63..fdbd087b6 100644 --- a/typing-break/drwright.c +++ b/typing-break/drwright.c @@ -593,48 +593,23 @@ popup_about_cb (gpointer callback_data, guint action, GtkWidget *widget) { - static GtkWidget *about_window; - GdkPixbuf *icon; - char *authors [] = { + gint i; + gchar *authors[] = { N_("Written by Richard Hult "), N_("Eye candy added by Anders Carlsson"), NULL }; - int i; - if (about_window) { - gtk_window_present (GTK_WINDOW (about_window)); - return; - } - for (i = 0; authors [i]; i++) authors [i] = _(authors [i]); - about_window = gtk_about_dialog_new (); - - g_signal_connect (about_window, - "destroy", - G_CALLBACK (gtk_widget_destroyed), - &about_window); - - icon = NULL; /*gdk_pixbuf_new_from_file (IMAGEDIR "/bar.png", NULL);*/ - - g_object_set (about_window, - "name", _("Typing Monitor"), - "version", VERSION, - "comments", _("A computer break reminder."), - "authors", authors, - "logo", icon, - NULL); - - if (icon != NULL) - g_object_unref (icon); - - g_signal_connect (about_window, - "response", G_CALLBACK (gtk_widget_destroy), - NULL); - - gtk_widget_show (about_window); + gtk_show_about_dialog (NULL, + "authors", authors, + "comments", _("A computer break reminder."), + "logo-icon-name", "typing-monitor", + "translator-credits", _("translator-credits"), + "version", VERSION, + NULL); } static void diff --git a/typing-break/main.c b/typing-break/main.c index 2c98c4be8..83a6a2e1f 100644 --- a/typing-break/main.c +++ b/typing-break/main.c @@ -81,6 +81,9 @@ main (int argc, char *argv[]) ++i; } + g_set_application_name (_("Typing Monitor")); + gtk_window_set_default_icon_name ("typing-monitor"); + gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv, NULL); diff --git a/typing-break/typing-monitor.png b/typing-break/typing-monitor.png new file mode 100644 index 000000000..41ee09cff Binary files /dev/null and b/typing-break/typing-monitor.png differ diff --git a/typing-break/typing-monitor.svg b/typing-break/typing-monitor.svg new file mode 100644 index 000000000..b8298719d --- /dev/null +++ b/typing-break/typing-monitor.svg @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + +