Browse Source

Check for running instance on startup, exit if there is one.

upstream/xfce4-panel-4.10.1
Nick Schermer 13 years ago
parent
commit
00af001923
  1. 5
      TODO
  2. 2
      libxfce4panel/xfce-arrow-button.c
  3. 56
      libxfce4panel/xfce-panel-macros.h
  4. 31
      libxfce4panel/xfce-panel-plugin.c
  5. 11
      panel/main.c
  6. 16
      panel/panel-application.c
  7. 43
      panel/panel-dbus-client.c
  8. 2
      panel/panel-dbus-client.h
  9. 12
      panel/panel-dbus-service.c
  10. 2
      panel/panel-plugin-external.c
  11. 6
      panel/panel-private.c
  12. 2
      panel/panel-private.h
  13. 8
      panel/panel-window.c
  14. 8
      plugins/clock/clock-analog.c
  15. 16
      plugins/clock/clock-binary.c
  16. 10
      plugins/clock/clock-digital.c
  17. 24
      plugins/clock/clock-lcd.c
  18. 2
      wrapper/wrapper-plug.c

5
TODO

@ -1,6 +1,10 @@
Things to do for Xfce Panel
===========================
General
-------
- Fix all the code with TODO in the comment.
Libxfce4panel
-------------
- Add support for visibility.
@ -13,6 +17,7 @@ Panel
- Make struts applicaion wide, we can set one strut for
each screen.
- Support for remote plugins.
- Some issues with sensitivity and plugin dnd (cancel with escape).
Plugins
--------

2
libxfce4panel/xfce-arrow-button.c

@ -123,7 +123,7 @@ xfce_arrow_button_class_init (XfceArrowButtonClass * klass)
"The arrow type of the menu button",
GTK_TYPE_ARROW_TYPE,
GTK_ARROW_UP,
G_PARAM_READWRITE | PANEL_PARAM_STATIC_STRINGS));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

56
libxfce4panel/xfce-panel-macros.h

@ -26,40 +26,34 @@
G_BEGIN_DECLS
/* support macros for debugging */
/* support macros for debugging (improved macro for better position indication) */
#ifndef NDEBUG
#define panel_assert(expr) g_assert (expr)
#define panel_assert_not_reached() g_assert_not_reached ()
#define panel_return_if_fail(expr) g_return_if_fail (expr)
#define panel_return_val_if_fail(expr, val) g_return_val_if_fail (expr, (val))
#define panel_assert(expr) g_assert (expr)
#define panel_assert_not_reached() g_assert_not_reached ()
#define panel_return_if_fail(expr) panel_return_val_if_fail(expr,{})
#define panel_return_val_if_fail(expr,val) G_STMT_START { \
if (G_UNLIKELY (!(expr))) \
{ \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \
"%s (%s): expression '%s' failed.", G_STRLOC, G_STRFUNC, \
#expr); \
return (val); \
}; }G_STMT_END
#else
#define panel_assert(expr) G_STMT_START{ (void)0; }G_STMT_END
#define panel_assert_not_reached() G_STMT_START{ (void)0; }G_STMT_END
#define panel_return_if_fail(expr) G_STMT_START{ (void)0; }G_STMT_END
#define panel_return_val_if_fail(expr, val) G_STMT_START{ (void)0; }G_STMT_END
#define panel_assert(expr) G_STMT_START{ (void)0; }G_STMT_END
#define panel_assert_not_reached() G_STMT_START{ (void)0; }G_STMT_END
#define panel_return_if_fail(expr) G_STMT_START{ (void)0; }G_STMT_END
#define panel_return_val_if_fail(expr,val) G_STMT_START{ (void)0; }G_STMT_END
#endif
/* canonical representation for static strings */
#define I_(string) (g_intern_static_string ((string)))
/* static parameter strings */
#if GLIB_CHECK_VERSION (2,13,0)
#define PANEL_PARAM_STATIC_STRINGS (G_PARAM_STATIC_STRINGS)
#else
#define PANEL_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
/* this is defined in glib 2.13.0 */
#ifndef G_PARAM_STATIC_STRINGS
#define G_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
#endif
/* gdk atoms */
#if GTK_CHECK_VERSION (2,10,0)
#define panel_atom_intern(string) gdk_atom_intern_static_string ((string))
#else
#define panel_atom_intern(string) gdk_atom_intern ((string), FALSE)
#endif
/* cairo context source color */
#define panel_cairo_set_source_rgba (cr, color, alpha) \
if (
/* make api compatible with 4.4 panel */
#ifndef XFCE_DISABLE_DEPRECATED
@ -80,12 +74,12 @@ G_BEGIN_DECLS
#define PANEL_PARAM_WRITABLE G_PARAM_WRITABLE | PANEL_PARAM_STATIC_STRINGS
/* slice allocator (deprecated) */
#define panel_slice_alloc(block_size) (g_slice_alloc ((block_size)))
#define panel_slice_alloc0(block_size) (g_slice_alloc0 ((block_size)))
#define panel_slice_free1(block_size, mem_block) G_STMT_START{ g_slice_free1 ((block_size), (mem_block)); }G_STMT_END
#define panel_slice_new(type) (g_slice_new (type))
#define panel_slice_new0(type) (g_slice_new0 (type))
#define panel_slice_free(type, ptr) G_STMT_START{ g_slice_free (type, (ptr)); }G_STMT_END
#define panel_slice_alloc(block_size) (g_slice_alloc ((block_size)))
#define panel_slice_alloc0(block_size) (g_slice_alloc0 ((block_size)))
#define panel_slice_free1(block_size, mem_block) G_STMT_START{ g_slice_free1 ((block_size), (mem_block)); }G_STMT_END
#define panel_slice_new(type) (g_slice_new (type))
#define panel_slice_new0(type) (g_slice_new0 (type))
#define panel_slice_free(type, ptr) G_STMT_START{ g_slice_free (type, (ptr)); }G_STMT_END
/* debug macros (deprecated) */
#define _panel_assert(expr) panel_assert (expr)

31
libxfce4panel/xfce-panel-plugin.c

@ -104,6 +104,9 @@ struct _XfcePanelPluginPrivate
/* plugin menu */
GtkWidget *menu;
/* block the plugin menu */
guint menu_blocked : 1;
};
@ -291,7 +294,7 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
"Name",
"Plugin internal name",
NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
/**
* XfcePanelPlugin:display-name:
@ -307,7 +310,7 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
"Display Name",
"Plugin display name",
NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
/**
* XfcePanelPlugin:id:
@ -323,7 +326,7 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
"ID",
"Unique plugin ID",
NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
/**
* XfcePanelPlugin:arguments:
@ -335,7 +338,7 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
g_param_spec_pointer ("arguments",
"Arguemnts",
"Startup arguments for the plugin",
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
}
@ -356,6 +359,7 @@ xfce_panel_plugin_init (XfcePanelPlugin *plugin)
plugin->priv->orientation = GTK_ORIENTATION_HORIZONTAL;
plugin->priv->screen_position = XFCE_SCREEN_POSITION_NONE;
plugin->priv->menu = NULL;
plugin->priv->menu_blocked = FALSE;
/* hide the event box window to make the plugin transparent */
gtk_event_box_set_visible_window (GTK_EVENT_BOX (plugin), FALSE);
@ -503,7 +507,8 @@ xfce_panel_plugin_button_press_event (GtkWidget *widget,
/* get the default accelerator modifier mask */
modifiers = event->state & gtk_accelerator_get_default_mod_mask ();
if (event->button == 3 || (event->button == 1 && modifiers == GDK_CONTROL_MASK))
if (plugin->priv->menu_blocked == FALSE
&& (event->button == 3 || (event->button == 1 && modifiers == GDK_CONTROL_MASK)))
{
/* create the menu if needed */
if (G_UNLIKELY (plugin->priv->menu == NULL))
@ -725,9 +730,9 @@ xfce_panel_plugin_menu_new (XfcePanelPlugin *plugin)
static gchar *
xfce_panel_plugin_relative_filename (XfcePanelPlugin *plugin)
{
g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
g_return_val_if_fail (xfce_panel_plugin_get_name (plugin) != NULL, NULL);
g_return_val_if_fail (xfce_panel_plugin_get_id (plugin) != NULL, NULL);
panel_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
panel_return_val_if_fail (xfce_panel_plugin_get_name (plugin) != NULL, NULL);
panel_return_val_if_fail (xfce_panel_plugin_get_id (plugin) != NULL, NULL);
/* return the relative configuration filename */
return g_strdup_printf ("xfce4" G_DIR_SEPARATOR_S "panel" G_DIR_SEPARATOR_S "%s-%s.rc",
@ -1032,6 +1037,9 @@ void
xfce_panel_plugin_block_menu (XfcePanelPlugin *plugin)
{
g_return_if_fail (XFCE_IS_PANEL_PLUGIN (plugin));
/* block the menu */
plugin->priv->menu_blocked = TRUE;
}
@ -1040,6 +1048,9 @@ void
xfce_panel_plugin_unblock_menu (XfcePanelPlugin *plugin)
{
g_return_if_fail (XFCE_IS_PANEL_PLUGIN (plugin));
/* block the menu */
plugin->priv->menu_blocked = FALSE;
}
@ -1221,7 +1232,7 @@ xfce_panel_plugin_lookup_rc_file (XfcePanelPlugin *plugin)
{
gchar *filename, *path;
panel_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
/* get the relative filename */
filename = xfce_panel_plugin_relative_filename (plugin);
@ -1257,7 +1268,7 @@ xfce_panel_plugin_save_location (XfcePanelPlugin *plugin,
{
gchar *filename, *path;
panel_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
/* get the relative filename */
filename = xfce_panel_plugin_relative_filename (plugin);

11
panel/main.c

@ -156,6 +156,17 @@ main (gint argc, gchar **argv)
goto dbus_return;
}
else if (panel_dbus_client_check_client_running (&error))
{
/* quit without error if and instance is running */
result = !!(error == NULL);
/* print message */
if (G_LIKELY (result == TRUE))
g_message (_("There is already a running instance..."));
goto dbus_return;
}
/* create a new application */
application = panel_application_get ();

16
panel/panel-application.c

@ -261,7 +261,8 @@ panel_application_load (PanelApplication *application)
/* create empty panel window */
window = panel_application_new_window (application, NULL);
/* TODO add some cruft here */
/* TODO: create fallback panel layout instead of an empty window
* not entritely sure if an empty window is that bad... */
/* show window */
gtk_widget_show (GTK_WIDGET (window));
@ -325,12 +326,12 @@ panel_application_load_set_property (PanelWindow *window,
}
else if (exo_str_is_equal (name, "screen-position"))
{
/* TODO */
/* TODO: convert to the old screen position enum */
}
}
/* TODO */
/* TODO: finish and rename function */
static void
expand_handle (GtkWidget *plugin,
gboolean expand,
@ -350,6 +351,7 @@ expand_handle (GtkWidget *plugin,
/* TODO: move away from here */
static const GtkTargetEntry drag_targets[] =
{
{ "application/x-xfce-panel-plugin-widget", 0, 0 }
@ -357,6 +359,7 @@ static const GtkTargetEntry drag_targets[] =
/* TODO: finish and rename function */
static void
move_handle (GtkWidget *item,
PanelApplication *application)
@ -397,11 +400,13 @@ panel_application_get_unique_id (void)
static gchar id[30];
/* create a unique if of the current time and counter */
g_snprintf (id, sizeof(id), "%ld%d", time (NULL), counter++);
g_snprintf (id, sizeof (id), "%ld%d", time (NULL), counter++);
return id;
}
static gboolean
panel_application_insert_plugin (PanelApplication *application,
PanelWindow *window,
@ -976,9 +981,8 @@ panel_application_drag_data_received (GtkWidget *itembar,
panel_itembar_reorder_child (PANEL_ITEMBAR (itembar), provider, position);
/* set new panel size */
/* TODO: update more panel-dependent settings after a move */
xfce_panel_plugin_provider_set_size (XFCE_PANEL_PLUGIN_PROVIDER (provider), panel_window_get_size (window));
/* TODO update more here */
}
/* everything went fine */

43
panel/panel-dbus-client.c

@ -39,6 +39,7 @@ panel_dbus_client_send_message (DBusMessage *message,
DBusMessage *result;
DBusError derror;
/* initialize the dbus error */
dbus_error_init (&derror);
/* try to connect to the session bus */
@ -62,7 +63,9 @@ panel_dbus_client_send_message (DBusMessage *message,
else
dbus_set_g_error (error, &derror);
/* cleanup */
dbus_error_free (&derror);
return FALSE;
}
@ -121,6 +124,46 @@ panel_dbus_client_display_dialog (GdkScreen *screen,
gboolean
panel_dbus_client_check_client_running (GError **error)
{
DBusConnection *connection;
DBusError derror;
gboolean result;
panel_return_val_if_fail (error == NULL || *error == NULL, TRUE);
/* initialize the dbus error */
dbus_error_init (&derror);
/* try to connect to the session bus */
connection = dbus_bus_get (DBUS_BUS_SESSION, &derror);
if (G_UNLIKELY (connection == NULL))
{
dbus_set_g_error (error, &derror);
dbus_error_free (&derror);
return TRUE;
}
/* check if the name is already owned */
result = dbus_bus_name_has_owner (connection, PANEL_DBUS_SERVICE_INTERFACE, &derror);
/* handle the error is one is set */
if (result == FALSE && dbus_error_is_set (&derror))
{
dbus_set_g_error (error, &derror);
dbus_error_free (&derror);
/* return on true on error */
result = TRUE;
}
return result;
}
gboolean
panel_dbus_client_display_preferences_dialog (GdkScreen *screen,
GError **error)

2
panel/panel-dbus-client.h

@ -21,6 +21,8 @@
#include <glib.h>
#include <gdk/gdk.h>
gboolean panel_dbus_client_check_client_running (GError **error);
gboolean panel_dbus_client_display_preferences_dialog (GdkScreen *screen,
GError **error);

12
panel/panel-dbus-service.c

@ -82,6 +82,7 @@ static void
panel_dbus_service_init (PanelDBusService *service)
{
GError *error = NULL;
gint result;
/* try to connect to the session bus */
service->connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
@ -91,9 +92,9 @@ panel_dbus_service_init (PanelDBusService *service)
/* register the /org/xfce/Panel object */
dbus_g_connection_register_g_object (service->connection, PANEL_DBUS_SERVICE_PATH, G_OBJECT (service));
/* request the org.xfce.Mousepad name for Mousepad */
dbus_bus_request_name (dbus_g_connection_get_connection (service->connection),
PANEL_DBUS_SERVICE_INTERFACE, DBUS_NAME_FLAG_REPLACE_EXISTING, NULL);
/* request the org.xfce.Panel name */
result = dbus_bus_request_name (dbus_g_connection_get_connection (service->connection),
PANEL_DBUS_SERVICE_INTERFACE, 0, NULL);
}
else
{
@ -129,7 +130,7 @@ panel_dbus_service_display_preferences_dialog (PanelDBusService *service,
panel_return_val_if_fail (PANEL_IS_DBUS_SERVICE (service), FALSE);
panel_return_val_if_fail (error == NULL || *error == NULL, FALSE);
g_message ("Show preferences dialog on display %s", display);
/* TODO: open/move the dialog to the correct screen */
/* show the prefernces dialog */
panel_preferences_dialog_show (NULL);
@ -147,7 +148,7 @@ panel_dbus_service_display_items_dialog (PanelDBusService *service,
panel_return_val_if_fail (PANEL_IS_DBUS_SERVICE (service), FALSE);
panel_return_val_if_fail (error == NULL || *error == NULL, FALSE);
g_message ("Show items dialog on display %s", display);
/* TODO: open/move the dialog to the correct screen */
/* show the items dialog */
panel_item_dialog_show ();
@ -238,4 +239,3 @@ panel_dbus_service_new (void)
/* include the dbus glue generated by dbus-binding-tool */
#include <panel/panel-dbus-service-infos.h>

2
panel/panel-plugin-external.c

@ -120,7 +120,7 @@ panel_plugin_external_class_init (PanelPluginExternalClass *klass)
gtksocket_class->plug_removed = panel_plugin_external_plug_removed;
/* initialize the global message atom */
message_atom = panel_atom_intern ("XFCE_PANEL_PLUGIN");
message_atom = gdk_atom_intern_static_string ("XFCE_PANEL_PLUGIN");
}

6
panel/panel-private.c

@ -53,7 +53,7 @@ _window_set_opacity (GtkWindow *window,
{
/* remove property */
gdk_property_delete (GTK_WIDGET (window)->window,
panel_atom_intern ("_NET_WM_WINDOW_OPACITY"));
gdk_atom_intern_static_string ("_NET_WM_WINDOW_OPACITY"));
}
else
{
@ -62,8 +62,8 @@ _window_set_opacity (GtkWindow *window,
/* set window property */
gdk_property_change (GTK_WIDGET (window)->window,
panel_atom_intern ("_NET_WM_WINDOW_OPACITY"),
panel_atom_intern ("CARDINAL"), 32,
gdk_atom_intern_static_string ("_NET_WM_WINDOW_OPACITY"),
gdk_atom_intern_static_string ("CARDINAL"), 32,
GDK_PROP_MODE_REPLACE,
(guchar *) &cardinal, 1L);
}

2
panel/panel-private.h

@ -30,7 +30,7 @@ G_BEGIN_DECLS
/* handling deprecated functions in gtk */
#if GTK_CHECK_VERSION (2,12,0)
#define _widget_set_tooltip_text(widget,text) gtk_widget_set_tooltip_text (widget, text)
#define _window_set_opacity(window,opacity) gtk_window_set_opacity (window, opacity)
#define _window_set_opacity(window,opacity) gtk_window_set_opacity (window, opacity)
#else
void _widget_set_tooltip_text (GtkWidget *widget,

8
panel/panel-window.c

@ -227,9 +227,9 @@ panel_window_class_init (PanelWindowClass *klass)
EXO_PARAM_READABLE));
/* initialize the atoms */
cardinal_atom = panel_atom_intern ("CARDINAL");
net_wm_strut_atom = panel_atom_intern ("_NET_WM_STRUT");
net_wm_strut_partial_atom = panel_atom_intern ("_NET_WM_STRUT_PARTIAL");
cardinal_atom = gdk_atom_intern_static_string ("CARDINAL");
net_wm_strut_atom = gdk_atom_intern_static_string ("_NET_WM_STRUT");
net_wm_strut_partial_atom = gdk_atom_intern_static_string ("_NET_WM_STRUT_PARTIAL");
}
@ -1309,8 +1309,6 @@ panel_window_working_area (PanelWindow *window,
/* only try to extend when there are more then 2 monitors */
if (G_LIKELY (n_monitors > 1))
{
/* TODO: loop for > 2 monitors */
for (i = 0; i < n_monitors; i++)
{
/* skip the origional monitor */

8
plugins/clock/clock-analog.c

@ -117,11 +117,11 @@ xfce_clock_analog_class_init (XfceClockAnalogClass *klass)
**/
g_object_class_install_property (gobject_class,
PROP_SHOW_SECONDS,
g_param_spec_boolean ("show-seconds",
"show-seconds",
g_param_spec_boolean ("show-seconds",
"show-seconds",
FALSE,
G_PARAM_READWRITE | PANEL_PARAM_STATIC_STRINGS));
"show-seconds",
FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

16
plugins/clock/clock-binary.c

@ -105,22 +105,22 @@ xfce_clock_binary_class_init (XfceClockBinaryClass *klass)
**/
g_object_class_install_property (gobject_class,
PROP_SHOW_SECONDS,
g_param_spec_boolean ("show-seconds",
"show-seconds",
g_param_spec_boolean ("show-seconds",
"show-seconds",
FALSE,
G_PARAM_READWRITE | PANEL_PARAM_STATIC_STRINGS));
"show-seconds",
FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* Whether this is a true binary clock
**/
g_object_class_install_property (gobject_class,
PROP_TRUE_BINARY,
g_param_spec_boolean ("true-binary",
"true-binary",
g_param_spec_boolean ("true-binary",
"true-binary",
"true-binary",
FALSE,
G_PARAM_READWRITE | PANEL_PARAM_STATIC_STRINGS));
FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

10
plugins/clock/clock-digital.c

@ -87,11 +87,11 @@ xfce_clock_digital_class_init (XfceClockDigitalClass *klass)
**/
g_object_class_install_property (gobject_class,
PROP_DIGITAL_FORMAT,
g_param_spec_string ("digital-format",
"digital-format",
g_param_spec_string ("digital-format",
"digital-format",
NULL,
G_PARAM_READWRITE | PANEL_PARAM_STATIC_STRINGS));
"digital-format",
NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
@ -188,7 +188,7 @@ xfce_clock_digital_update (gpointer user_data)
struct tm tm;
panel_return_val_if_fail (XFCE_IS_CLOCK_DIGITAL (clock), FALSE);
if (clock->format != NULL)
{
/* get the local time */

24
plugins/clock/clock-lcd.c

@ -117,44 +117,44 @@ xfce_clock_lcd_class_init (XfceClockLcdClass *klass)
**/
g_object_class_install_property (gobject_class,
PROP_SHOW_SECONDS,
g_param_spec_boolean ("show-seconds",
"show-seconds",
g_param_spec_boolean ("show-seconds",
"show-seconds",
"show-seconds",
FALSE,
G_PARAM_READWRITE | PANEL_PARAM_STATIC_STRINGS));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* Whether we show a 24h clock
**/
g_object_class_install_property (gobject_class,
PROP_SHOW_MILITARY,
g_param_spec_boolean ("show-military",
"show-military",
g_param_spec_boolean ("show-military",
"show-military",
"show-military",
FALSE,
G_PARAM_READWRITE | PANEL_PARAM_STATIC_STRINGS));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* Whether we show am or pm
**/
g_object_class_install_property (gobject_class,
PROP_SHOW_MERIDIEM,
g_param_spec_boolean ("show-meridiem",
"show-meridiem",
g_param_spec_boolean ("show-meridiem",
"show-meridiem",
"show-meridiem",
TRUE,
G_PARAM_READWRITE | PANEL_PARAM_STATIC_STRINGS));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* Whether to flash the time separators
**/
g_object_class_install_property (gobject_class,
PROP_FLASH_SEPARATORS,
g_param_spec_boolean ("flash-separators",
"flash-separators",
g_param_spec_boolean ("flash-separators",
"flash-separators",
"flash-separators",
FALSE,
G_PARAM_READWRITE | PANEL_PARAM_STATIC_STRINGS));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

2
wrapper/wrapper-plug.c

@ -103,7 +103,7 @@ wrapper_plug_init (WrapperPlug *plug)
{
/* init vars */
plug->socket_id = 0;
plug->atom = panel_atom_intern ("XFCE_PANEL_PLUGIN");
plug->atom = gdk_atom_intern_static_string ("XFCE_PANEL_PLUGIN");
plug->background_alpha = 1.00;
plug->is_active_panel = FALSE;
plug->is_composited = FALSE;

Loading…
Cancel
Save