[Pkg-xfce-commits] [Git][xfce-team/goodies/xfce4-whiskermenu-plugin][debian/master] 3 commits: New upstream version 2.5.1.

Unit 193 gitlab at salsa.debian.org
Sat Jan 2 22:28:44 GMT 2021



Unit 193   pushed to branch debian/master 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.
- - - - -
4ec4e36a by Unit 193 at 2021-01-02T17:23:21-05:00
Update upstream source from tag 'upstream/2.5.1'

Update to upstream version '2.5.1'
with Debian dir 6d2b44d934693e3461afab2d9c6369102fa75219
- - - - -
151b8fdc by Unit 193 at 2021-01-02T17:23:58-05:00
Update changelog for release.

- - - - -


7 changed files:

- CMakeLists.txt
- NEWS
- debian/changelog
- 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)


=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+xfce4-whiskermenu-plugin (2.5.1-1) unstable; urgency=medium
+
+  * Team upload.
+  * New upstream version 2.5.1.
+
+ -- Unit 193 <unit193 at debian.org>  Sat, 02 Jan 2021 17:23:41 -0500
+
 xfce4-whiskermenu-plugin (2.5.0-1) unstable; urgency=medium
 
   * Team upload.


=====================================
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/-/compare/d17cf88b4af9aa689b1a22f7373fa07cf6d6716d...151b8fdc417e18851ea46662461417f522a782b1

-- 
View it on GitLab: https://salsa.debian.org/xfce-team/goodies/xfce4-whiskermenu-plugin/-/compare/d17cf88b4af9aa689b1a22f7373fa07cf6d6716d...151b8fdc417e18851ea46662461417f522a782b1
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/852e0fad/attachment-0001.html>


More information about the Pkg-xfce-commits mailing list