Browse Source

Cleanup code a bit.

upstream/xfce4-panel-4.10.1
Nick Schermer 12 years ago
parent
commit
d1706ff390
  1. 7
      libxfce4panel/xfce-arrow-button.c
  2. 5
      libxfce4panel/xfce-panel-image.c
  3. 5
      libxfce4panel/xfce-panel-plugin.c
  4. 12
      panel/panel-base-window.c
  5. 7
      panel/panel-plugin-external.c
  6. 34
      panel/panel-preferences-dialog.c
  7. 2
      wrapper/wrapper-plug.c

7
libxfce4panel/xfce-arrow-button.c

@ -51,10 +51,6 @@
#define XFCE_ARROW_BUTTON_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
XFCE_TYPE_ARROW_BUTTON, \
XfceArrowButtonPrivate))
#define ARROW_WIDTH (8)
#define MAX_BLINKING_COUNT (16)
@ -171,8 +167,7 @@ xfce_arrow_button_class_init (XfceArrowButtonClass * klass)
static void
xfce_arrow_button_init (XfceArrowButton *button)
{
/* set private pointer */
button->priv = XFCE_ARROW_BUTTON_GET_PRIVATE (button);
button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button, XFCE_TYPE_ARROW_BUTTON, XfceArrowButtonPrivate);
/* initialize button values */
button->priv->arrow_type = GTK_ARROW_UP;

5
libxfce4panel/xfce-panel-image.c

@ -61,9 +61,6 @@
/* design limit for the panel, to reduce the uncached pixbuf size */
#define MAX_PIXBUF_SIZE (128)
#define XFCE_PANEL_IMAGE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
XFCE_TYPE_PANEL_IMAGE, \
XfcePanelImagePrivate))
#define xfce_panel_image_unref_null(obj) G_STMT_START { if ((obj) != NULL) \
{ \
g_object_unref (G_OBJECT (obj)); \
@ -193,7 +190,7 @@ xfce_panel_image_init (XfcePanelImage *image)
{
GTK_WIDGET_SET_FLAGS (image, GTK_NO_WINDOW);
image->priv = XFCE_PANEL_IMAGE_GET_PRIVATE (image);
image->priv = G_TYPE_INSTANCE_GET_PRIVATE (image, XFCE_TYPE_PANEL_IMAGE, XfcePanelImagePrivate);
image->priv->pixbuf = NULL;
image->priv->cache = NULL;

5
libxfce4panel/xfce-panel-plugin.c

@ -48,9 +48,6 @@
#define XFCE_PANEL_PLUGIN_CONSTRUCTED(plugin) \
PANEL_HAS_FLAG (XFCE_PANEL_PLUGIN (plugin)->priv->flags, \
PLUGIN_FLAG_CONSTRUCTED)
#define XFCE_PANEL_PLUGIN_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
XFCE_TYPE_PANEL_PLUGIN, \
XfcePanelPluginPrivate))
@ -567,7 +564,7 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
static void
xfce_panel_plugin_init (XfcePanelPlugin *plugin)
{
plugin->priv = XFCE_PANEL_PLUGIN_GET_PRIVATE (plugin);
plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin, XFCE_TYPE_PANEL_PLUGIN, XfcePanelPluginPrivate);
plugin->priv->name = NULL;
plugin->priv->display_name = NULL;

12
panel/panel-base-window.c

@ -36,12 +36,6 @@
#define PANEL_BASE_WINDOW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
PANEL_TYPE_BASE_WINDOW, \
PanelBaseWindowPrivate))
static void panel_base_window_get_property (GObject *object,
guint prop_id,
GValue *value,
@ -198,15 +192,15 @@ panel_base_window_class_init (PanelBaseWindowClass *klass)
static void
panel_base_window_init (PanelBaseWindow *window)
{
window->priv = PANEL_BASE_WINDOW_GET_PRIVATE (window);
window->priv = G_TYPE_INSTANCE_GET_PRIVATE (window, PANEL_TYPE_BASE_WINDOW, PanelBaseWindowPrivate);
window->is_composited = FALSE;
window->background_alpha = 1.00;
window->background_style = PANEL_BG_STYLE_NONE;
window->background_image = NULL;
window->background_color = NULL;
window->priv->bg_image_cache = NULL;
window->priv->bg_image_cache = NULL;
window->priv->enter_opacity = 1.00;
window->priv->leave_opacity = 1.00;
window->priv->borders = PANEL_BORDER_NONE;

7
panel/panel-plugin-external.c

@ -105,10 +105,6 @@ static void panel_plugin_external_set_sensitive (PanelPluginEx
#define PANEL_PLUGIN_EXTERNAL_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), PANEL_TYPE_PLUGIN_EXTERNAL, PanelPluginExternalPrivate))
struct _PanelPluginExternalPrivate
{
/* startup arguments */
@ -197,7 +193,8 @@ panel_plugin_external_class_init (PanelPluginExternalClass *klass)
static void
panel_plugin_external_init (PanelPluginExternal *external)
{
external->priv = PANEL_PLUGIN_EXTERNAL_GET_PRIVATE (external);
external->priv = G_TYPE_INSTANCE_GET_PRIVATE (external, PANEL_TYPE_PLUGIN_EXTERNAL, PanelPluginExternalPrivate);
external->module = NULL;
external->show_configure = FALSE;
external->show_about = FALSE;

34
panel/panel-preferences-dialog.c

@ -45,42 +45,42 @@
static void panel_preferences_dialog_finalize (GObject *object);
static void panel_preferences_dialog_response (GtkWidget *window,
gint response_id,
static void panel_preferences_dialog_response (GtkWidget *window,
gint response_id,
PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_bindings_unbind (PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_bindings_add (PanelPreferencesDialog *dialog,
const gchar *property1,
static void panel_preferences_dialog_bindings_add (PanelPreferencesDialog *dialog,
const gchar *property1,
const gchar *property2);
static void panel_preferences_dialog_bindings_update (PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_output_changed (GtkComboBox *combobox,
static void panel_preferences_dialog_output_changed (GtkComboBox *combobox,
PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_bg_style_changed (PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_bg_image_file_set (GtkFileChooserButton *button,
static void panel_preferences_dialog_bg_image_file_set (GtkFileChooserButton *button,
PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_bg_image_notified (PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_panel_combobox_changed (GtkComboBox *combobox,
static void panel_preferences_dialog_panel_combobox_changed (GtkComboBox *combobox,
PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_panel_combobox_rebuild (PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_panel_add (GtkWidget *widget,
static void panel_preferences_dialog_panel_add (GtkWidget *widget,
PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_panel_remove (GtkWidget *widget,
static void panel_preferences_dialog_panel_remove (GtkWidget *widget,
PanelPreferencesDialog *dialog);
static XfcePanelPluginProvider *panel_preferences_dialog_item_get_selected (PanelPreferencesDialog *dialog,
static XfcePanelPluginProvider *panel_preferences_dialog_item_get_selected (PanelPreferencesDialog *dialog,
GtkTreeIter *return_iter);
static void panel_preferences_dialog_item_store_rebuild (GtkWidget *itembar,
static void panel_preferences_dialog_item_store_rebuild (GtkWidget *itembar,
PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_item_move (GtkWidget *button,
static void panel_preferences_dialog_item_move (GtkWidget *button,
PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_item_remove (GtkWidget *button,
static void panel_preferences_dialog_item_remove (GtkWidget *button,
PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_item_add (GtkWidget *button,
static void panel_preferences_dialog_item_add (GtkWidget *button,
PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_item_properties (GtkWidget *button,
static void panel_preferences_dialog_item_properties (GtkWidget *button,
PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_item_about (GtkWidget *button,
static void panel_preferences_dialog_item_about (GtkWidget *button,
PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_item_selection_changed (GtkTreeSelection *selection,
static void panel_preferences_dialog_item_selection_changed (GtkTreeSelection *selection,
PanelPreferencesDialog *dialog);

2
wrapper/wrapper-plug.c

@ -103,7 +103,7 @@ wrapper_plug_init (WrapperPlug *plug)
/* set the colormap */
screen = gtk_window_get_screen (GTK_WINDOW (plug));
colormap = gdk_screen_get_rgba_colormap (screen);
if (colormap == NULL)

Loading…
Cancel
Save