Browse Source

Drop xfce_panel_allow_customization().

This function was designed to check if the plugin
runs in kiosk mode, but as an alternative there is now
xfce_panel_plugin_get_locked() and plugins should
implement this on their own (I even think nobody
used the function).

The old xfce_allow_panel_customization() is now a
macro that defaults to FALSE.
upstream/xfce4-panel-4.10.1
Nick Schermer 12 years ago
parent
commit
786e7fe7e5
  1. 1
      docs/references/libxfce4panel-sections.txt
  2. 2
      libxfce4panel/libxfce4panel-deprecated.h
  3. 1
      libxfce4panel/libxfce4panel.symbols
  4. 29
      libxfce4panel/xfce-panel-convenience.c
  5. 2
      libxfce4panel/xfce-panel-convenience.h

1
docs/references/libxfce4panel-sections.txt

@ -57,7 +57,6 @@ xfce_hvbox_get_type
<TITLE>Convenience Functions</TITLE>
xfce_panel_create_button
xfce_panel_create_toggle_button
xfce_panel_allow_customization
</SECTION>
<SECTION>

2
libxfce4panel/libxfce4panel-deprecated.h

@ -67,7 +67,7 @@ enum /*< skip >*/
#define xfce_create_panel_button xfce_panel_create_button
#define xfce_create_panel_toggle_button xfce_panel_create_toggle_button
#define xfce_allow_panel_customization xfce_panel_allow_customization
#define xfce_allow_panel_customization (FALSE)
#define _panel_g_type_register_simple(type_parent,type_name_static,class_size,class_init,instance_size,instance_init) \
g_type_register_static_simple(type_parent,type_name_static,class_size,class_init,instance_size,instance_init, 0)

1
libxfce4panel/libxfce4panel.symbols

@ -65,7 +65,6 @@ xfce_hvbox_get_orientation
#if IN_SOURCE(__XFCE_PANEL_CONVENIENCE_C__)
xfce_panel_create_button G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT
xfce_panel_create_toggle_button G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT
xfce_panel_allow_customization
#endif
#endif

29
libxfce4panel/xfce-panel-convenience.c

@ -90,34 +90,5 @@ xfce_panel_create_toggle_button (void)
/**
* xfce_panel_allow_customization:
*
* Check if the user is allowed to customize the panel. Uses the kiosk mode
* implementation from libxfce4util.
*
* Returns: %TRUE if the user is allowed to customize the panel, %FALSE
* otherwise.
**/
gboolean
xfce_panel_allow_customization (void)
{
static gboolean allow_customization = FALSE;
static gboolean checked = FALSE;
XfceKiosk *kiosk;
if (G_UNLIKELY (!checked))
{
kiosk = xfce_kiosk_new ("xfce4-panel");
allow_customization = xfce_kiosk_query (kiosk, "CustomizePanel");
xfce_kiosk_free (kiosk);
checked = TRUE;
}
return allow_customization;
}
#define __XFCE_PANEL_CONVENIENCE_C__
#include <libxfce4panel/libxfce4panel-aliasdef.c>

2
libxfce4panel/xfce-panel-convenience.h

@ -33,8 +33,6 @@ GtkWidget *xfce_panel_create_button (void) G_GNUC_MALLOC G_GNUC_WARN_UNU
GtkWidget *xfce_panel_create_toggle_button (void) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
gboolean xfce_panel_allow_customization (void);
G_END_DECLS
#endif /* !__XFCE_PANEL_CONVENIENCE_H__ */

Loading…
Cancel
Save