[easytag] Add "Remove all text" to tag field context menu
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Add "Remove all text" to tag field context menu
- Date: Sun, 6 Jan 2013 14:03:08 +0000 (UTC)
commit 434a1cbe5bb6cce6a58d7c2964dc172448bb8d09
Author: Andreas Winkelmann <ml awinkelmann de>
Date: Tue Dec 25 02:28:00 2012 +0100
Add "Remove all text" to tag field context menu
src/easytag.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/easytag.c b/src/easytag.c
index 74db013..5990060 100644
--- a/src/easytag.c
+++ b/src/easytag.c
@@ -4561,6 +4561,12 @@ void Convert_Only_One_Space (GtkWidget *entry)
g_free(string);
}
+static void
+Convert_Remove_All_Text (GtkWidget *entry)
+{
+ gtk_entry_set_text (GTK_ENTRY (entry), "");
+}
+
/*
* Entry_Popup_Menu_Handler: show the popup menu when the third mouse button is pressed.
*/
@@ -4676,6 +4682,14 @@ void Attach_Popup_Menu_To_Tag_Entries (GtkEntry *entry)
g_signal_connect_swapped(G_OBJECT(MenuItem),"activate",
G_CALLBACK(Convert_Only_One_Space),G_OBJECT(entry));
+ MenuItem = gtk_image_menu_item_new_with_label (_("Remove all text"));
+ Image = gtk_image_new_from_stock (GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM(MenuItem), Image);
+ gtk_menu_shell_append (GTK_MENU_SHELL(PopupMenu), MenuItem);
+ g_signal_connect_swapped (G_OBJECT (MenuItem), "activate",
+ G_CALLBACK (Convert_Remove_All_Text),
+ G_OBJECT (entry));
+
gtk_widget_show_all(PopupMenu);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]