Browse Source

Rename panel-builder to panel-utils.

upstream/xfce4-panel-4.10.1
Nick Schermer 12 years ago
parent
commit
5362a49a71
  1. 4
      common/Makefile.am
  2. 26
      common/panel-utils.c
  3. 6
      common/panel-utils.h
  4. 4
      panel/panel-application.c
  5. 4
      panel/panel-item-dialog.c
  6. 4
      panel/panel-preferences-dialog.c
  7. 4
      panel/panel-window.c
  8. 8
      plugins/actions/actions.c
  9. 8
      plugins/applicationsmenu/applicationsmenu.c
  10. 8
      plugins/clock/clock.c
  11. 8
      plugins/directorymenu/directorymenu.c
  12. 8
      plugins/launcher/launcher-dialog.c
  13. 8
      plugins/pager/pager.c
  14. 8
      plugins/separator/separator.c
  15. 8
      plugins/systray/systray.c
  16. 8
      plugins/tasklist/tasklist.c
  17. 8
      plugins/windowmenu/windowmenu.c
  18. 2
      po/POTFILES.in

4
common/Makefile.am

@ -12,8 +12,8 @@ noinst_LTLIBRARIES = \
libpanel_common_la_SOURCES = \
panel-debug.c \
panel-debug.h \
panel-builder.c \
panel-builder.h \
panel-utils.c \
panel-utils.h \
panel-xfconf.c \
panel-xfconf.h

26
common/panel-builder.c → common/panel-utils.c

@ -1,5 +1,5 @@
/*
* Copyright (C) 2009 Nick Schermer <nick@xfce.org>
* Copyright (C) 2009-2010 Nick Schermer <nick@xfce.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -28,13 +28,13 @@
#include <exo/exo.h>
#include <common/panel-private.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
static void
panel_builder_help_button_clicked (GtkWidget *button,
XfcePanelPlugin *panel_plugin)
panel_utils_help_button_clicked (GtkWidget *button,
XfcePanelPlugin *panel_plugin)
{
GtkWidget *toplevel;
@ -42,7 +42,7 @@ panel_builder_help_button_clicked (GtkWidget *button,
panel_return_if_fail (GTK_IS_WIDGET (button));
toplevel = gtk_widget_get_toplevel (button);
panel_builder_show_help (GTK_WINDOW (toplevel),
panel_utils_show_help (GTK_WINDOW (toplevel),
xfce_panel_plugin_get_name (panel_plugin),
"properties");
}
@ -50,10 +50,10 @@ panel_builder_help_button_clicked (GtkWidget *button,
GtkBuilder *
panel_builder_new (XfcePanelPlugin *panel_plugin,
const gchar *buffer,
gsize length,
GObject **dialog_return)
panel_utils_builder_new (XfcePanelPlugin *panel_plugin,
const gchar *buffer,
gsize length,
GObject **dialog_return)
{
GError *error = NULL;
GtkBuilder *builder;
@ -84,7 +84,7 @@ panel_builder_new (XfcePanelPlugin *panel_plugin,
button = gtk_builder_get_object (builder, "help-button");
if (G_LIKELY (button != NULL))
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (panel_builder_help_button_clicked), panel_plugin);
G_CALLBACK (panel_utils_help_button_clicked), panel_plugin);
if (G_LIKELY (dialog_return != NULL))
*dialog_return = dialog;
@ -110,9 +110,9 @@ panel_builder_new (XfcePanelPlugin *panel_plugin,
void
panel_builder_show_help (GtkWindow *parent,
const gchar *page,
const gchar *offset)
panel_utils_show_help (GtkWindow *parent,
const gchar *page,
const gchar *offset)
{
GdkScreen *screen;
gchar *filename;

6
common/panel-builder.h → common/panel-utils.h

@ -23,16 +23,16 @@
#include <libxfce4panel/libxfce4panel.h>
/* Hook to make sure GtkBuilder knows are the XfceTitledDialog object */
#define PANEL_BUILDER_LINK_4UI \
#define PANEL_UTILS_LINK_4UI \
if (xfce_titled_dialog_get_type () == 0) \
return;
GtkBuilder *panel_builder_new (XfcePanelPlugin *panel_plugin,
GtkBuilder *panel_utils_builder_new (XfcePanelPlugin *panel_plugin,
const gchar *buffer,
gsize length,
GObject **dialog_return) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
void panel_builder_show_help (GtkWindow *parent,
void panel_utils_show_help (GtkWindow *parent,
const gchar *page,
const gchar *offset);

4
panel/panel-application.c

@ -33,7 +33,7 @@
#include <common/panel-private.h>
#include <common/panel-xfconf.h>
#include <common/panel-debug.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
#include <libxfce4panel/libxfce4panel.h>
#include <libxfce4panel/xfce-panel-plugin-provider.h>
@ -556,7 +556,7 @@ panel_application_plugin_provider_signal (XfcePanelPluginProvider *provide
case PROVIDER_SIGNAL_PANEL_HELP:
/* try to launch help browser */
panel_builder_show_help (NULL, NULL, NULL);
panel_utils_show_help (NULL, NULL, NULL);
break;
case PROVIDER_SIGNAL_FOCUS_PLUGIN:

4
panel/panel-item-dialog.c

@ -29,7 +29,7 @@
#include <libxfce4util/libxfce4util.h>
#include <common/panel-private.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
#include <libxfce4panel/libxfce4panel.h>
#include <panel/panel-application.h>
@ -301,7 +301,7 @@ panel_item_dialog_response (GtkDialog *gtk_dialog,
if (response_id == GTK_RESPONSE_HELP)
{
panel_builder_show_help (GTK_WINDOW (gtk_dialog), "add-new-items", NULL);
panel_utils_show_help (GTK_WINDOW (gtk_dialog), "add-new-items", NULL);
}
else if (response_id == GTK_RESPONSE_OK)
{

4
panel/panel-preferences-dialog.c

@ -25,7 +25,7 @@
#include <libxfce4ui/libxfce4ui.h>
#include <common/panel-private.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
#include <libxfce4panel/libxfce4panel.h>
#include <libxfce4panel/xfce-panel-plugin-provider.h>
@ -268,7 +268,7 @@ panel_preferences_dialog_response (GtkWidget *window,
if (G_UNLIKELY (response_id == 1))
{
panel_builder_show_help (GTK_WINDOW (window), "preferences", NULL);
panel_utils_show_help (GTK_WINDOW (window), "preferences", NULL);
}
else
{

4
panel/panel-window.c

@ -30,7 +30,7 @@
#include <exo/exo.h>
#include <common/panel-private.h>
#include <common/panel-debug.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
#include <libxfce4panel/libxfce4panel.h>
#include <libxfce4panel/xfce-panel-plugin-provider.h>
#include <panel/panel-base-window.h>
@ -2022,7 +2022,7 @@ panel_window_menu_quit (gpointer boolean)
static void
panel_window_menu_help (void)
{
panel_builder_show_help (NULL, NULL, NULL);
panel_utils_show_help (NULL, NULL, NULL);
}

8
plugins/actions/actions.c

@ -28,7 +28,7 @@
#include <common/panel-private.h>
#include <common/panel-xfconf.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
#include "actions.h"
#include "actions-dialog_ui.h"
@ -345,9 +345,9 @@ actions_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
panel_return_if_fail (XFCE_IS_ACTIONS_PLUGIN (plugin));
/* setup the dialog */
PANEL_BUILDER_LINK_4UI
builder = panel_builder_new (panel_plugin, actions_dialog_ui,
actions_dialog_ui_length, &dialog);
PANEL_UTILS_LINK_4UI
builder = panel_utils_builder_new (panel_plugin, actions_dialog_ui,
actions_dialog_ui_length, &dialog);
if (G_UNLIKELY (builder == NULL))
return;

8
plugins/applicationsmenu/applicationsmenu.c

@ -26,7 +26,7 @@
#include <libxfce4util/libxfce4util.h>
#include <libxfce4panel/libxfce4panel.h>
#include <common/panel-xfconf.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
#include <common/panel-private.h>
#include "applicationsmenu.h"
@ -471,9 +471,9 @@ applications_menu_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
GObject *dialog, *object, *object2;
/* setup the dialog */
PANEL_BUILDER_LINK_4UI
builder = panel_builder_new (panel_plugin, applicationsmenu_dialog_ui,
applicationsmenu_dialog_ui_length, &dialog);
PANEL_UTILS_LINK_4UI
builder = panel_utils_builder_new (panel_plugin, applicationsmenu_dialog_ui,
applicationsmenu_dialog_ui_length, &dialog);
if (G_UNLIKELY (builder == NULL))
return;

8
plugins/clock/clock.c

@ -33,7 +33,7 @@
#include <libxfce4panel/libxfce4panel.h>
#include <common/panel-private.h>
#include <common/panel-xfconf.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
#include "clock.h"
#include "clock-analog.h"
@ -710,9 +710,9 @@ clock_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
panel_return_if_fail (XFCE_IS_CLOCK_PLUGIN (plugin));
/* setup the dialog */
PANEL_BUILDER_LINK_4UI
builder = panel_builder_new (panel_plugin, clock_dialog_ui,
clock_dialog_ui_length, &window);
PANEL_UTILS_LINK_4UI
builder = panel_utils_builder_new (panel_plugin, clock_dialog_ui,
clock_dialog_ui_length, &window);
if (G_UNLIKELY (builder == NULL))
return;

8
plugins/directorymenu/directorymenu.c

@ -26,7 +26,7 @@
#include <libxfce4util/libxfce4util.h>
#include <libxfce4panel/libxfce4panel.h>
#include <common/panel-xfconf.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
#include <common/panel-private.h>
#ifdef HAVE_GIO_UNIX
@ -404,9 +404,9 @@ directory_menu_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
icon_name = DEFAULT_ICON_NAME;
/* setup the dialog */
PANEL_BUILDER_LINK_4UI
builder = panel_builder_new (panel_plugin, directorymenu_dialog_ui,
directorymenu_dialog_ui_length, &dialog);
PANEL_UTILS_LINK_4UI
builder = panel_utils_builder_new (panel_plugin, directorymenu_dialog_ui,
directorymenu_dialog_ui_length, &dialog);
if (G_UNLIKELY (builder == NULL))
return;

8
plugins/launcher/launcher-dialog.c

@ -32,7 +32,7 @@
#include <gio/gio.h>
#include <common/panel-private.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
#include "launcher.h"
#include "launcher-dialog.h"
@ -954,9 +954,9 @@ launcher_dialog_show (LauncherPlugin *plugin)
panel_return_if_fail (XFCE_IS_LAUNCHER_PLUGIN (plugin));
/* setup the dialog */
PANEL_BUILDER_LINK_4UI
builder = panel_builder_new (XFCE_PANEL_PLUGIN (plugin), launcher_dialog_ui,
launcher_dialog_ui_length, &window);
PANEL_UTILS_LINK_4UI
builder = panel_utils_builder_new (XFCE_PANEL_PLUGIN (plugin), launcher_dialog_ui,
launcher_dialog_ui_length, &window);
if (G_UNLIKELY (builder == NULL))
return;

8
plugins/pager/pager.c

@ -26,7 +26,7 @@
#include <libxfce4util/libxfce4util.h>
#include <libxfce4ui/libxfce4ui.h>
#include <common/panel-xfconf.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
#include <common/panel-private.h>
#include <libwnck/libwnck.h>
#include <exo/exo.h>
@ -456,9 +456,9 @@ pager_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
panel_return_if_fail (XFCE_IS_PAGER_PLUGIN (plugin));
/* setup the dialog */
PANEL_BUILDER_LINK_4UI
builder = panel_builder_new (panel_plugin, pager_dialog_ui,
pager_dialog_ui_length, &dialog);
PANEL_UTILS_LINK_4UI
builder = panel_utils_builder_new (panel_plugin, pager_dialog_ui,
pager_dialog_ui_length, &dialog);
if (G_UNLIKELY (builder == NULL))
return;

8
plugins/separator/separator.c

@ -28,7 +28,7 @@
#include <libxfce4ui/libxfce4ui.h>
#include <common/panel-private.h>
#include <common/panel-xfconf.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
#include <exo/exo.h>
#include "separator.h"
@ -350,7 +350,7 @@ separator_plugin_construct (XfcePanelPlugin *panel_plugin)
xfce_panel_plugin_menu_show_configure (XFCE_PANEL_PLUGIN (plugin));
/* connect all properties */
PANEL_BUILDER_LINK_4UI
PANEL_UTILS_LINK_4UI
panel_properties_bind (NULL, G_OBJECT (plugin),
xfce_panel_plugin_get_property_base (panel_plugin),
properties, FALSE);
@ -401,8 +401,8 @@ separator_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
panel_return_if_fail (XFCE_IS_SEPARATOR_PLUGIN (plugin));
/* setup the dialog */
builder = panel_builder_new (panel_plugin, separator_dialog_ui,
separator_dialog_ui_length, &dialog);
builder = panel_utils_builder_new (panel_plugin, separator_dialog_ui,
separator_dialog_ui_length, &dialog);
if (G_UNLIKELY (builder == NULL))
return;

8
plugins/systray/systray.c

@ -25,7 +25,7 @@
#include <libxfce4ui/libxfce4ui.h>
#include <common/panel-private.h>
#include <common/panel-xfconf.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
#include <exo/exo.h>
#include "systray.h"
@ -464,9 +464,9 @@ systray_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
GObject *dialog, *object, *store;
/* setup the dialog */
PANEL_BUILDER_LINK_4UI
builder = panel_builder_new (panel_plugin, systray_dialog_ui,
systray_dialog_ui_length, &dialog);
PANEL_UTILS_LINK_4UI
builder = panel_utils_builder_new (panel_plugin, systray_dialog_ui,
systray_dialog_ui_length, &dialog);
if (G_UNLIKELY (builder == NULL))
return;

8
plugins/tasklist/tasklist.c

@ -23,7 +23,7 @@
#include <exo/exo.h>
#include <libxfce4ui/libxfce4ui.h>
#include <common/panel-xfconf.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
#include <common/panel-private.h>
#include <libxfce4panel/libxfce4panel.h>
@ -187,9 +187,9 @@ tasklist_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
GObject *object;
/* setup the dialog */
PANEL_BUILDER_LINK_4UI
builder = panel_builder_new (panel_plugin, tasklist_dialog_ui,
tasklist_dialog_ui_length, &dialog);
PANEL_UTILS_LINK_4UI
builder = panel_utils_builder_new (panel_plugin, tasklist_dialog_ui,
tasklist_dialog_ui_length, &dialog);
if (G_UNLIKELY (builder == NULL))
return;

8
plugins/windowmenu/windowmenu.c

@ -25,7 +25,7 @@
#include <libxfce4panel/libxfce4panel.h>
#include <libwnck/libwnck.h>
#include <common/panel-xfconf.h>
#include <common/panel-builder.h>
#include <common/panel-utils.h>
#include <gdk/gdkkeysyms.h>
#include <common/panel-private.h>
@ -551,9 +551,9 @@ window_menu_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
"style" };
/* setup the dialog */
PANEL_BUILDER_LINK_4UI
builder = panel_builder_new (panel_plugin, windowmenu_dialog_ui,
windowmenu_dialog_ui_length, &dialog);
PANEL_UTILS_LINK_4UI
builder = panel_utils_builder_new (panel_plugin, windowmenu_dialog_ui,
windowmenu_dialog_ui_length, &dialog);
if (G_UNLIKELY (builder == NULL))
return;

2
po/POTFILES.in

@ -1,7 +1,7 @@
panel-desktop-handler.desktop.in
panel-preferences.desktop.in
common/panel-builder.c
common/panel-utils.c
libxfce4panel/xfce-arrow-button.c
libxfce4panel/xfce-hvbox.c

Loading…
Cancel
Save