[Xfce4-commits] [xfce/xfce4-panel] 01/01: Removed button arg from _get_icon_size()
noreply at xfce.org
noreply at xfce.org
Sun Mar 19 21:47:40 CET 2017
This is an automated email from the git hooks/post-receive script.
andrzejr pushed a commit to branch master
in repository xfce/xfce4-panel.
commit c200ae82fcbee3572606280f3f69fa5840c7bfb5
Author: Andrzej <ndrwrdck at gmail.com>
Date: Sun Mar 19 20:42:41 2017 +0000
Removed button arg from _get_icon_size()
---
libxfce4panel/xfce-panel-plugin.c | 6 ++----
libxfce4panel/xfce-panel-plugin.h | 3 +--
plugins/actions/actions.c | 2 +-
plugins/directorymenu/directorymenu.c | 5 ++---
plugins/launcher/launcher.c | 5 ++---
plugins/showdesktop/showdesktop.c | 2 +-
plugins/tasklist/tasklist-widget.c | 4 ++--
plugins/windowmenu/windowmenu.c | 2 +-
8 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index d83e0fa..1b3452a 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -1958,15 +1958,13 @@ xfce_panel_plugin_set_small (XfcePanelPlugin *plugin,
/**
* xfce_panel_plugin_get_icon_size:
* @plugin : an #XfcePanelPlugin,
- * @button : a #GtkWidget.
*
- * Returns preferred icon size inside a button.
+ * Returns a preferred icon size.
*
* Since: 4.14
**/
gint
-xfce_panel_plugin_get_icon_size (XfcePanelPlugin *plugin,
- GtkWidget *button)
+xfce_panel_plugin_get_icon_size (XfcePanelPlugin *plugin)
{
gint width;
width = xfce_panel_plugin_get_size (plugin) / xfce_panel_plugin_get_nrows (plugin);
diff --git a/libxfce4panel/xfce-panel-plugin.h b/libxfce4panel/xfce-panel-plugin.h
index f7f2bf2..89c18ab 100644
--- a/libxfce4panel/xfce-panel-plugin.h
+++ b/libxfce4panel/xfce-panel-plugin.h
@@ -187,8 +187,7 @@ gboolean xfce_panel_plugin_get_small (XfcePanelPlugin *
void xfce_panel_plugin_set_small (XfcePanelPlugin *plugin,
gboolean small);
-gint xfce_panel_plugin_get_icon_size (XfcePanelPlugin *plugin,
- GtkWidget *button) G_GNUC_PURE;
+gint xfce_panel_plugin_get_icon_size (XfcePanelPlugin *plugin) G_GNUC_PURE;
GtkOrientation xfce_panel_plugin_get_orientation (XfcePanelPlugin *plugin) G_GNUC_PURE;
diff --git a/plugins/actions/actions.c b/plugins/actions/actions.c
index 9cbde2a..f91566a 100644
--- a/plugins/actions/actions.c
+++ b/plugins/actions/actions.c
@@ -427,7 +427,7 @@ actions_plugin_size_changed (XfcePanelPlugin *panel_plugin,
gtk_widget_set_size_request (GTK_WIDGET (li->data),
max_size, max_size);
icon = GTK_IMAGE (gtk_bin_get_child (GTK_BIN (li->data)));
- icon_size = xfce_panel_plugin_get_icon_size (panel_plugin, GTK_WIDGET (li->data));
+ icon_size = xfce_panel_plugin_get_icon_size (panel_plugin);
gtk_image_set_pixel_size (GTK_IMAGE (icon), icon_size);
}
}
diff --git a/plugins/directorymenu/directorymenu.c b/plugins/directorymenu/directorymenu.c
index 27820a8..78ed2bd 100644
--- a/plugins/directorymenu/directorymenu.c
+++ b/plugins/directorymenu/directorymenu.c
@@ -229,8 +229,6 @@ directory_menu_plugin_set_property (GObject *object,
gint icon_size;
const gchar *path;
- icon_size = xfce_panel_plugin_get_icon_size (XFCE_PANEL_PLUGIN (object), GTK_WIDGET (plugin->button));
-
switch (prop_id)
{
case PROP_BASE_DIRECTORY:
@@ -253,6 +251,7 @@ directory_menu_plugin_set_property (GObject *object,
case PROP_ICON_NAME:
g_free (plugin->icon_name);
plugin->icon_name = g_value_dup_string (value);
+ icon_size = xfce_panel_plugin_get_icon_size (XFCE_PANEL_PLUGIN (object));
gtk_image_set_from_icon_name (GTK_IMAGE (plugin->icon),
panel_str_is_empty (plugin->icon_name) ? DEFAULT_ICON_NAME : plugin->icon_name,
icon_size);
@@ -358,7 +357,7 @@ directory_menu_plugin_size_changed (XfcePanelPlugin *panel_plugin,
/* force a square button */
size /= xfce_panel_plugin_get_nrows (panel_plugin);
gtk_widget_set_size_request (GTK_WIDGET (panel_plugin), size, size);
- icon_size = xfce_panel_plugin_get_icon_size (plugin, GTK_WIDGET (plugin->button));
+ icon_size = xfce_panel_plugin_get_icon_size (plugin);
gtk_image_set_pixel_size (GTK_IMAGE (plugin->icon), icon_size);
return TRUE;
diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 171d8fe..fd2269b 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -1266,7 +1266,7 @@ launcher_plugin_size_changed (XfcePanelPlugin *panel_plugin,
/* initialize the plugin size */
size /= xfce_panel_plugin_get_nrows (panel_plugin);
p_width = p_height = size;
- icon_size = xfce_panel_plugin_get_icon_size (panel_plugin, plugin->button);
+ icon_size = xfce_panel_plugin_get_icon_size (panel_plugin);
/* add the arrow size */
if (gtk_widget_get_visible (plugin->arrow))
@@ -1728,8 +1728,7 @@ launcher_plugin_button_update (LauncherPlugin *plugin)
item = GARCON_MENU_ITEM (plugin->items->data);
mode = xfce_panel_plugin_get_mode (XFCE_PANEL_PLUGIN (plugin));
- icon_size = xfce_panel_plugin_get_icon_size (XFCE_PANEL_PLUGIN (plugin),
- GTK_WIDGET (plugin->button));
+ icon_size = xfce_panel_plugin_get_icon_size (XFCE_PANEL_PLUGIN (plugin));
/* disable the "small" property in the deskbar mode and the label visible */
if (G_UNLIKELY (plugin->show_label && mode == XFCE_PANEL_PLUGIN_MODE_DESKBAR))
diff --git a/plugins/showdesktop/showdesktop.c b/plugins/showdesktop/showdesktop.c
index 0e262e7..c205f8d 100644
--- a/plugins/showdesktop/showdesktop.c
+++ b/plugins/showdesktop/showdesktop.c
@@ -188,7 +188,7 @@ show_desktop_plugin_size_changed (XfcePanelPlugin *panel_plugin,
/* keep the button squared */
size /= xfce_panel_plugin_get_nrows (panel_plugin);
gtk_widget_set_size_request (GTK_WIDGET (panel_plugin), size, size);
- icon_size = xfce_panel_plugin_get_icon_size (panel_plugin, GTK_WIDGET (plugin->button));
+ icon_size = xfce_panel_plugin_get_icon_size (panel_plugin);
gtk_image_set_pixel_size (GTK_IMAGE (plugin->icon), icon_size);
return TRUE;
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index 86c5266..47bea47 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -2497,8 +2497,8 @@ xfce_tasklist_button_icon_changed (WnckWindow *window,
if (tasklist->minimized_icon_lucency == 0)
return;
- icon_size = xfce_panel_plugin_get_icon_size (xfce_tasklist_get_panel_plugin (tasklist),
- GTK_WIDGET (child->button));
+ icon_size = xfce_panel_plugin_get_icon_size (xfce_tasklist_get_panel_plugin (tasklist));
+
/* get the window icon */
if (tasklist->show_labels)
pixbuf = wnck_window_get_mini_icon (window);
diff --git a/plugins/windowmenu/windowmenu.c b/plugins/windowmenu/windowmenu.c
index 17db16f..3b833b2 100644
--- a/plugins/windowmenu/windowmenu.c
+++ b/plugins/windowmenu/windowmenu.c
@@ -634,7 +634,7 @@ window_menu_plugin_active_window_changed (WnckScreen *screen,
panel_return_if_fail (WNCK_IS_SCREEN (screen));
panel_return_if_fail (plugin->screen == screen);
- icon_size = xfce_panel_plugin_get_icon_size (plugin, GTK_WIDGET (plugin->button));
+ icon_size = xfce_panel_plugin_get_icon_size (plugin);
/* only do this when the icon is visible */
if (plugin->button_style == BUTTON_STYLE_ICON)
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list