Commit d391c455 authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

minor cleanup and some evilness

Sat Nov 04 22:59:52 2000  George Lebl <jirka@5z.com>

	* gnome-run.c, foobar-widget.[ch]:  minor cleanup and some evilness
parent efe2165c
Sat Nov 04 22:59:52 2000 George Lebl <jirka@5z.com>
* gnome-run.c, foobar-widget.[ch]: minor cleanup and some evilness
Thu Nov 02 22:19:18 2000 George Lebl <jirka@5z.com>
* session.c: only check for /proc/apm on linux. Also read the
......
Sat Nov 04 22:59:52 2000 George Lebl <jirka@5z.com>
* gnome-run.c, foobar-widget.[ch]: minor cleanup and some evilness
Thu Nov 02 22:19:18 2000 George Lebl <jirka@5z.com>
* session.c: only check for /proc/apm on linux. Also read the
......
......@@ -394,10 +394,11 @@ timeout_cb (gpointer data)
static void
set_fooclock_format (GtkWidget *w, char *format)
{
if (!IS_FOOBAR_WIDGET (das_global_foobar))
if ( ! IS_FOOBAR_WIDGET (das_global_foobar))
return;
foobar_widget_set_clock_format (FOOBAR_WIDGET (das_global_foobar), _(format));
foobar_widget_set_clock_format (FOOBAR_WIDGET (das_global_foobar),
_(format));
}
static void
......@@ -483,6 +484,17 @@ append_clock_menu (FoobarWidget *foo, GtkWidget *menu_bar)
return item;
}
void
foobar_widget_global_set_clock_format (const char *format)
{
if (das_global_foobar == NULL ||
! IS_FOOBAR_WIDGET (das_global_foobar))
return;
foobar_widget_set_clock_format (FOOBAR_WIDGET (das_global_foobar),
format);
}
void
foobar_widget_set_clock_format (FoobarWidget *foo, const char *clock_format)
{
......
......@@ -70,6 +70,8 @@ gint foobar_widget_get_height (void);
void foobar_widget_force_menu_remake (void);
void foobar_widget_global_set_clock_format (const char *format);
END_GNOME_DECLS
#endif
......@@ -26,6 +26,7 @@
#include <errno.h>
#include "panel-include.h"
#include "foobar-widget.h"
#include "gnome-run.h"
......@@ -60,6 +61,27 @@ string_callback (GtkWidget *w, int button_num, gpointer data)
if (string_empty (s))
goto return_and_close;
/* evil eggies, do not translate! */
if (strcmp (s, "time shall be unixey") == 0) {
foobar_widget_global_set_clock_format ("%s");
goto return_and_close;
}
if (strcmp (s, "you shall bring us a shrubbery") == 0) {
GtkWidget *dlg;
gnome_ok_dialog ("NI! NI! NI! NI! NI! NI!");
goto return_and_close;
}
if (strcmp (s, "supreme executive power") == 0) {
GtkWidget *dlg;
dlg = gnome_ok_dialog ("Listen -- strange women lying in\n"
"ponds distributing swords is no\n"
"basis for a system of government.\n"
"Supreme executive power derives from\n"
"a mandate from the masses, not from\n"
"some farcical aquatic ceremony!");
goto return_and_close;
}
/* Somewhat of a hack I suppose */
if (strncmp (s, "http://", strlen ("http://")) == 0 ||
strncmp (s, "https://", strlen ("https://")) == 0 ||
......@@ -71,9 +93,9 @@ string_callback (GtkWidget *w, int button_num, gpointer data)
/* we use a popt function as it does exactly what we want to do and
gnome already uses popt */
if(poptParseArgvString(s, &temp_argc, &temp_argv) != 0) {
panel_error_dialog(_("Failed to execute command:\n"
"%s"), s);
if (poptParseArgvString (s, &temp_argc, &temp_argv) != 0) {
panel_error_dialog (_("Failed to execute command:\n"
"%s"), s);
goto return_and_close;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment