Commit 6d905e6a authored by Glynn Foster's avatar Glynn Foster Committed by Glynn Foster

Make the foo clock use gconf.

2001-12-11  Glynn Foster  <glynn.foster@sun.com>

	* button-widget.c, launcher.c,  menu.c
	  panel-widget.c, panelglobalconfig.schemas
	  session.c:

	Make the foo clock use gconf.
parent ec21a4c5
2001-12-11 Glynn Foster <glynn.foster@sun.com>
* button-widget.c, launcher.c, menu.c
panel-widget.c, panelglobalconfig.schemas
session.c:
Make the foo clock use gconf.
2001-12-11 Stephen Browne <stephen.browne@sun.com>
* gnome-properties.c gnome-properties.glade
......
......@@ -16,7 +16,7 @@
#include "panel_config_global.h"
#include "rgb-stuff.h"
#undef BUTTON_WIDGET_DEBUG
#undef BUTTON_WIDGET_DEBUG
#define BUTTON_WIDGET_DISPLACEMENT 5
......@@ -578,9 +578,6 @@ button_widget_draw(ButtonWidget *button,
if(!global_config.highlight_when_over || !button->in_button) {
pb = button->pixbuf;
} else {
#ifdef BUTTON_WIDGET_DEBUG
printf ("Using highlighted pixbuf\n");
#endif
pb = button->pixbuf_hc;
}
if(pb != NULL) {
......@@ -789,6 +786,9 @@ button_widget_enter_notify (GtkWidget *widget, GdkEventCrossing *event)
if ((event_widget == widget) &&
(event->detail != GDK_NOTIFY_INFERIOR)) {
ButtonWidget *button = BUTTON_WIDGET (widget);
#ifdef BUTTON_WIDGET_DEBUG
printf ("We should be getting events here!!\n");
#endif
button->in_button = TRUE;
if (button->cache)
gdk_pixmap_unref (button->cache);
......
......@@ -37,7 +37,7 @@
#include "gnome-ditem-edit.h"
#include "quick-desktop-reader.h"
#undef LAUNCHER_DEBUG
#undef LAUNCHER_DEBUG
static void properties_apply (Launcher *launcher);
......
......@@ -3045,9 +3045,7 @@ create_new_panel (GtkWidget *w, gpointer data)
panel = foobar_widget_new (screen);
/* Don't translate the first part of this string */
s = conditional_get_string
("/panel/Config/clock_format",
_("%I:%M:%S %p"), NULL);
s = panel_gconf_global_config_get_string ("clock-format");
if (s != NULL)
foobar_widget_set_clock_format (FOOBAR_WIDGET (panel), s);
g_free (s);
......
......@@ -245,6 +245,20 @@ Panel Global Config Schema File - work in progress
<long></long>
</locale>
</schema>
<schema>
<key>/schemas/apps/panel/global/clock-format</key>
<applyto>/apps/panel/global/clock-format</applyto>
<owner>panel</owner>
<type>string</type>
<default>%I:%M:%S %p</default>
<locale name="C">
<short>FIXME - This needs to be done better for something that is
at least user understandable
</short>
<long></long>
</locale>
</schema>
</schemalist>
......
......@@ -245,6 +245,20 @@ Panel Global Config Schema File - work in progress
<long></long>
</locale>
</schema>
<schema>
<key>/schemas/apps/panel/global/clock-format</key>
<applyto>/apps/panel/global/clock-format</applyto>
<owner>panel</owner>
<type>string</type>
<default>%I:%M:%S %p</default>
<locale name="C">
<short>FIXME - This needs to be done better for something that is
at least user understandable
</short>
<long></long>
</locale>
</schema>
</schemalist>
......
......@@ -245,6 +245,20 @@ Panel Global Config Schema File - work in progress
<long></long>
</locale>
</schema>
<schema>
<key>/schemas/apps/panel/global/clock-format</key>
<applyto>/apps/panel/global/clock-format</applyto>
<owner>panel</owner>
<type>string</type>
<default>%I:%M:%S %p</default>
<locale name="C">
<short>FIXME - This needs to be done better for something that is
at least user understandable
</short>
<long></long>
</locale>
</schema>
</schemalist>
......
......@@ -245,6 +245,20 @@ Panel Global Config Schema File - work in progress
<long></long>
</locale>
</schema>
<schema>
<key>/schemas/apps/panel/global/clock-format</key>
<applyto>/apps/panel/global/clock-format</applyto>
<owner>panel</owner>
<type>string</type>
<default>%I:%M:%S %p</default>
<locale name="C">
<short>FIXME - This needs to be done better for something that is
at least user understandable
</short>
<long></long>
</locale>
</schema>
</schemalist>
......
......@@ -33,7 +33,7 @@ typedef enum {
GSList *panels = NULL; /*other panels we might want to move the applet to*/
/*define for some debug output*/
#undef PANEL_WIDGET_DEBUG
#undef PANEL_WIDGET_DEBUG
/*there can universally be only one applet being dragged since we assume
we only have one mouse :) */
......
......@@ -245,6 +245,20 @@ Panel Global Config Schema File - work in progress
<long></long>
</locale>
</schema>
<schema>
<key>/schemas/apps/panel/global/clock-format</key>
<applyto>/apps/panel/global/clock-format</applyto>
<owner>panel</owner>
<type>string</type>
<default>%I:%M:%S %p</default>
<locale name="C">
<short>FIXME - This needs to be done better for something that is
at least user understandable
</short>
<long></long>
</locale>
</schema>
</schemalist>
......
......@@ -51,7 +51,7 @@
#include "panel-applet-frame.h"
#include "panel-shell.h"
#undef SESSION_DEBUG
#undef SESSION_DEBUG
int config_sync_timeout = 0;
int applets_to_sync = FALSE;
......@@ -473,7 +473,7 @@ save_panel_configuration(gpointer data, gpointer user_data)
/*gnome_config_set_int ("temp_hidden", DRAWER_POS (basep->pos)->temp_state);*/
break;
case FOOBAR_PANEL:
gnome_config_set_string ("/panel/Config/clock_format", FOOBAR_WIDGET (pd->panel)->clock_format);
panel_gconf_global_config_set_string ("clock-format", FOOBAR_WIDGET (pd->panel)->clock_format);
gnome_config_set_int ("screen", FOOBAR_WIDGET (pd->panel)->screen);
break;
default:
......@@ -1268,9 +1268,7 @@ session_init_user_panels(void)
panel = foobar_widget_new (screen);
push_correct_global_prefix ();
s = conditional_get_string ("clock_format",
_("%I:%M:%S %p"),
NULL);
s = panel_gconf_global_config_get_string ("clock-format");
gnome_config_pop_prefix ();
if (s != NULL)
......@@ -1502,11 +1500,17 @@ session_read_global_config (void)
else if (!strcmp (key, "avoid-panel-overlap"))
global_config.avoid_collisions =
gconf_value_get_bool (value);
else
else if (!strcmp (key, "clock-format")) {
g_free (key);
gconf_entry_free (l->data);
g_slist_free (l);
return;
}
else
g_warning ("%s not handled", key);
g_free (key);
gconf_entry_free (l->data);
}
g_slist_free (l);
......
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