[Pkg-xfce-commits] [Git][xfce-team/goodies/xfce4-whiskermenu-plugin][upstream/latest] New upstream version 2.5.1.
Unit 193
gitlab at salsa.debian.org
Sat Jan 2 22:28:47 GMT 2021
Unit 193 pushed to branch upstream/latest at xfce / goodies / xfce4-whiskermenu-plugin
Commits:
00ba65bb by Unit 193 at 2021-01-02T17:23:19-05:00
New upstream version 2.5.1.
- - - - -
6 changed files:
- CMakeLists.txt
- NEWS
- panel-plugin/command.cpp
- panel-plugin/command.h
- panel-plugin/image-menu-item.h
- panel-plugin/settings.cpp
Changes:
=====================================
CMakeLists.txt
=====================================
@@ -5,7 +5,7 @@ project(whiskermenu)
# version number
set(whiskermenu_version_major "2")
set(whiskermenu_version_minor "5")
-set(whiskermenu_version_micro "0")
+set(whiskermenu_version_micro "1")
set(whiskermenu_version_tag "")
set(whiskermenu_version "${whiskermenu_version_major}.${whiskermenu_version_minor}.${whiskermenu_version_micro}")
if(${whiskermenu_version_tag} MATCHES "git")
=====================================
NEWS
=====================================
@@ -1,3 +1,7 @@
+2.5.1
+=====
+- Fix not always using new action icons. (Issue #33)
+
2.5.0
=====
- Add option to show all applications by default. (Issue #4)
=====================================
panel-plugin/command.cpp
=====================================
@@ -39,12 +39,14 @@ Command::Command(const gchar* icon, const gchar* fallback_icon, const gchar* tex
m_status(CommandStatus::Unchecked),
m_timeout_details({nullptr, g_strdup(confirm_question), g_strdup(confirm_status), 0})
{
- const gchar* icons[] = {
- icon,
- fallback_icon,
- nullptr
- };
- m_icon = g_themed_icon_new_from_names(const_cast<gchar**>(icons), -1);
+ if (gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), icon))
+ {
+ m_icon = g_strdup(icon);
+ }
+ else
+ {
+ m_icon = g_strdup(fallback_icon);
+ }
std::string tooltip(text ? text : "");
for (auto i = tooltip.begin(); i != tooltip.end(); ++i)
@@ -74,7 +76,7 @@ Command::~Command()
g_object_unref(m_menuitem);
}
- g_object_unref(m_icon);
+ g_free(m_icon);
g_free(m_mnemonic);
g_free(m_text);
g_free(m_command);
@@ -97,8 +99,7 @@ GtkWidget* Command::get_button()
gtk_widget_set_tooltip_text(m_button, m_text);
g_signal_connect_slot<GtkButton*>(m_button, "clicked", &Command::activate, this, Connect::After);
- GtkWidget* image = gtk_image_new_from_gicon(m_icon, GTK_ICON_SIZE_LARGE_TOOLBAR);
-
+ GtkWidget* image = gtk_image_new_from_icon_name(m_icon, GTK_ICON_SIZE_LARGE_TOOLBAR);
gtk_container_add(GTK_CONTAINER(m_button), GTK_WIDGET(image));
gtk_widget_set_visible(m_button, m_shown);
@@ -242,7 +243,7 @@ bool Command::confirm()
gtk_window_set_titlebar(window, header);
// Add icon
- GtkWidget* image = gtk_image_new_from_gicon(m_icon, GTK_ICON_SIZE_DIALOG);
+ GtkWidget* image = gtk_image_new_from_icon_name(m_icon, GTK_ICON_SIZE_DIALOG);
gtk_widget_show(image);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_message_dialog_set_image(GTK_MESSAGE_DIALOG(dialog), image);
@@ -250,7 +251,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
// Create accept button
GtkWidget* button = gtk_dialog_add_button(dialog, m_mnemonic, GTK_RESPONSE_ACCEPT);
- image = gtk_image_new_from_gicon(m_icon, GTK_ICON_SIZE_BUTTON);
+ image = gtk_image_new_from_icon_name(m_icon, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image(GTK_BUTTON(button), image);
gtk_dialog_set_default_response(dialog, GTK_RESPONSE_ACCEPT);
=====================================
panel-plugin/command.h
=====================================
@@ -72,7 +72,7 @@ private:
private:
GtkWidget* m_button;
GtkWidget* m_menuitem;
- GIcon* m_icon;
+ gchar* m_icon;
gchar* m_mnemonic;
gchar* m_text;
gchar* m_command;
=====================================
panel-plugin/image-menu-item.h
=====================================
@@ -40,14 +40,4 @@ G_GNUC_END_IGNORE_DEPRECATIONS
return menuitem;
}
-inline GtkWidget* whiskermenu_image_menu_item_new_with_mnemonic(GIcon* icon, const gchar* text)
-{
- GtkWidget* image = gtk_image_new_from_gicon(icon, GTK_ICON_SIZE_MENU);
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- GtkWidget* menuitem = gtk_image_menu_item_new_with_mnemonic(text);
- gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image);
-G_GNUC_END_IGNORE_DEPRECATIONS
- return menuitem;
-}
-
#endif
=====================================
panel-plugin/settings.cpp
=====================================
@@ -211,7 +211,7 @@ Settings::Settings() :
_("Log Ou_t..."),
"xfce4-session-logout",
_("Failed to log out."));
- command[CommandMenuEditor] = new Command("xfce4-menueditor", "menu-editor",
+ command[CommandMenuEditor] = new Command("menu-editor", "xfce4-menueditor",
_("_Edit Applications"),
"menulibre",
_("Failed to launch menu editor."));
View it on GitLab: https://salsa.debian.org/xfce-team/goodies/xfce4-whiskermenu-plugin/-/commit/00ba65bb797925268dbec83634324103d71b2b73
--
View it on GitLab: https://salsa.debian.org/xfce-team/goodies/xfce4-whiskermenu-plugin/-/commit/00ba65bb797925268dbec83634324103d71b2b73
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-xfce-commits/attachments/20210102/8ba3f98b/attachment-0001.html>
More information about the Pkg-xfce-commits
mailing list