Browse Source

Port the clock plugin to the new api. Not resident.

upstream/xfce4-panel-4.10.1
Nick Schermer 13 years ago
parent
commit
c9ac578633
  1. 2
      plugins/clock/clock-analog.c
  2. 10
      plugins/clock/clock-analog.h
  3. 2
      plugins/clock/clock-binary.c
  4. 10
      plugins/clock/clock-binary.h
  5. 2
      plugins/clock/clock-digital.c
  6. 10
      plugins/clock/clock-digital.h
  7. 2
      plugins/clock/clock-fuzzy.c
  8. 10
      plugins/clock/clock-fuzzy.h
  9. 2
      plugins/clock/clock-lcd.c
  10. 10
      plugins/clock/clock-lcd.h
  11. 11
      plugins/clock/clock.c
  12. 4
      plugins/clock/clock.h

2
plugins/clock/clock-analog.c

@ -92,7 +92,7 @@ struct _XfceClockAnalog
G_DEFINE_TYPE (XfceClockAnalog, xfce_clock_analog, GTK_TYPE_IMAGE);
XFCE_PANEL_DEFINE_TYPE (XfceClockAnalog, xfce_clock_analog, GTK_TYPE_IMAGE)

10
plugins/clock/clock-analog.h

@ -32,13 +32,15 @@ typedef struct _XfceClockAnalog XfceClockAnalog;
#define XFCE_CLOCK_IS_ANALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_ANALOG))
#define XFCE_CLOCK_ANALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_CLOCK_TYPE_ANALOG, XfceClockAnalogClass))
GType xfce_clock_analog_get_type (void) G_GNUC_CONST;
GType xfce_clock_analog_get_type (void) G_GNUC_CONST;
GtkWidget *xfce_clock_analog_new (void) G_GNUC_MALLOC;
void xfce_clock_analog_register_type (GTypeModule *type_module);
gboolean xfce_clock_analog_update (gpointer user_data);
GtkWidget *xfce_clock_analog_new (void) G_GNUC_MALLOC;
guint xfce_clock_analog_interval (XfceClockAnalog *analog);
gboolean xfce_clock_analog_update (gpointer user_data);
guint xfce_clock_analog_interval (XfceClockAnalog *analog);
G_END_DECLS

2
plugins/clock/clock-binary.c

@ -79,7 +79,7 @@ struct _XfceClockBinary
G_DEFINE_TYPE (XfceClockBinary, xfce_clock_binary, GTK_TYPE_IMAGE);
XFCE_PANEL_DEFINE_TYPE (XfceClockBinary, xfce_clock_binary, GTK_TYPE_IMAGE)

10
plugins/clock/clock-binary.h

@ -32,13 +32,15 @@ typedef struct _XfceClockBinary XfceClockBinary;
#define XFCE_CLOCK_IS_BINARY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_BINARY))
#define XFCE_CLOCK_BINARY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_CLOCK_TYPE_BINARY, XfceClockBinaryClass))
GType xfce_clock_binary_get_type (void) G_GNUC_CONST;
GType xfce_clock_binary_get_type (void) G_GNUC_CONST;
GtkWidget *xfce_clock_binary_new (void) G_GNUC_MALLOC;
void xfce_clock_binary_register_type (GTypeModule *type_module);
gboolean xfce_clock_binary_update (gpointer user_data);
GtkWidget *xfce_clock_binary_new (void) G_GNUC_MALLOC;
guint xfce_clock_binary_interval (XfceClockBinary *binary);
gboolean xfce_clock_binary_update (gpointer user_data);
guint xfce_clock_binary_interval (XfceClockBinary *binary);
G_END_DECLS

2
plugins/clock/clock-digital.c

@ -65,7 +65,7 @@ struct _XfceClockDigital
G_DEFINE_TYPE (XfceClockDigital, xfce_clock_digital, GTK_TYPE_LABEL);
XFCE_PANEL_DEFINE_TYPE (XfceClockDigital, xfce_clock_digital, GTK_TYPE_LABEL)

10
plugins/clock/clock-digital.h

@ -32,13 +32,15 @@ typedef struct _XfceClockDigital XfceClockDigital;
#define XFCE_CLOCK_IS_DIGITAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_DIGITAL))
#define XFCE_CLOCK_DIGITAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_CLOCK_TYPE_DIGITAL, XfceClockDigitalClass))
GType xfce_clock_digital_get_type (void) G_GNUC_CONST;
GType xfce_clock_digital_get_type (void) G_GNUC_CONST;
GtkWidget *xfce_clock_digital_new (void) G_GNUC_MALLOC;
void xfce_clock_digital_register_type (GTypeModule *type_module);
gboolean xfce_clock_digital_update (gpointer user_data);
GtkWidget *xfce_clock_digital_new (void) G_GNUC_MALLOC;
guint xfce_clock_digital_interval (XfceClockDigital *digital);
gboolean xfce_clock_digital_update (gpointer user_data);
guint xfce_clock_digital_interval (XfceClockDigital *digital);
G_END_DECLS

2
plugins/clock/clock-fuzzy.c

@ -102,7 +102,7 @@ const gchar *i18n_hour_names[] =
G_DEFINE_TYPE (XfceClockFuzzy, xfce_clock_fuzzy, GTK_TYPE_LABEL);
XFCE_PANEL_DEFINE_TYPE (XfceClockFuzzy, xfce_clock_fuzzy, GTK_TYPE_LABEL)

10
plugins/clock/clock-fuzzy.h

@ -32,13 +32,15 @@ typedef struct _XfceClockFuzzy XfceClockFuzzy;
#define XFCE_CLOCK_IS_FUZZY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_FUZZY))
#define XFCE_CLOCK_FUZZY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_CLOCK_TYPE_FUZZY, XfceClockFuzzyClass))
GType xfce_clock_fuzzy_get_type (void) G_GNUC_CONST;
GType xfce_clock_fuzzy_get_type (void) G_GNUC_CONST;
GtkWidget *xfce_clock_fuzzy_new (void) G_GNUC_MALLOC;
void xfce_clock_fuzzy_register_type (GTypeModule *type_module);
gboolean xfce_clock_fuzzy_update (gpointer user_data);
GtkWidget *xfce_clock_fuzzy_new (void) G_GNUC_MALLOC;
guint xfce_clock_fuzzy_interval (XfceClockFuzzy *fuzzy);
gboolean xfce_clock_fuzzy_update (gpointer user_data);
guint xfce_clock_fuzzy_interval (XfceClockFuzzy *fuzzy);
G_END_DECLS

2
plugins/clock/clock-lcd.c

@ -95,7 +95,7 @@ struct _XfceClockLcd
G_DEFINE_TYPE (XfceClockLcd, xfce_clock_lcd, GTK_TYPE_IMAGE);
XFCE_PANEL_DEFINE_TYPE (XfceClockLcd, xfce_clock_lcd, GTK_TYPE_IMAGE)

10
plugins/clock/clock-lcd.h

@ -32,13 +32,15 @@ typedef struct _XfceClockLcd XfceClockLcd;
#define XFCE_CLOCK_IS_LCD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_CLOCK_TYPE_LCD))
#define XFCE_CLOCK_LCD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_CLOCK_TYPE_LCD, XfceClockLcdClass))
GType xfce_clock_lcd_get_type (void) G_GNUC_CONST;
GType xfce_clock_lcd_get_type (void) G_GNUC_CONST;
GtkWidget *xfce_clock_lcd_new (void) G_GNUC_MALLOC;
void xfce_clock_lcd_register_type (GTypeModule *type_module);
gboolean xfce_clock_lcd_update (gpointer user_data);
GtkWidget *xfce_clock_lcd_new (void) G_GNUC_MALLOC;
guint xfce_clock_lcd_interval (XfceClockLcd *lcd);
gboolean xfce_clock_lcd_update (gpointer user_data);
guint xfce_clock_lcd_interval (XfceClockLcd *lcd);
G_END_DECLS

11
plugins/clock/clock.c

@ -119,10 +119,13 @@ struct _ClockPlugin
/* define and register the plugin */
G_DEFINE_TYPE (ClockPlugin, clock_plugin, XFCE_TYPE_PANEL_PLUGIN);
XFCE_PANEL_PLUGIN_REGISTER_OBJECT (XFCE_TYPE_CLOCK_PLUGIN);
/* define the plugin */
XFCE_PANEL_DEFINE_PLUGIN (ClockPlugin, clock_plugin,
xfce_clock_analog_register_type,
xfce_clock_binary_register_type,
xfce_clock_digital_register_type,
xfce_clock_fuzzy_register_type,
xfce_clock_lcd_register_type)

4
plugins/clock/clock.h

@ -51,7 +51,9 @@ typedef enum _ClockPluginMode ClockPluginMode;
GType clock_plugin_get_type (void) G_GNUC_CONST;
void clock_plugin_get_localtime (struct tm *tm);
void clock_plugin_register_type (GTypeModule *type_module);
void clock_plugin_get_localtime (struct tm *tm);
gchar *clock_plugin_strdup_strftime (const gchar *format,
const struct tm *tm);

Loading…
Cancel
Save