Magellan Linux

Annotation of /trunk/thunar-media-tags-plugin/patches/thunar-media-tags-plugin-0.1.2git-newtooltip-api.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1576 - (hide annotations) (download)
Fri Nov 25 14:09:25 2011 UTC (12 years, 5 months ago) by niro
File size: 8149 byte(s)
-added patches and git script
1 niro 1576 From d225ada545e196ebd7833103412f4a013f8a44f1 Mon Sep 17 00:00:00 2001
2     From: Lionel Le Folgoc <mrpouit@ubuntu.com>
3     Date: Mon, 8 Mar 2010 21:25:12 +0100
4     Subject: [PATCH] Switch to the new tooltip api in gtk, depend on gtk 2.12, and switch to exo-1
5    
6     ---
7     configure.in.in | 3 ++-
8     thunar-plugin/audio-tags-page.c | 22 +++++++---------------
9     thunar-plugin/tag-renamer.c | 16 +++-------------
10     3 files changed, 12 insertions(+), 29 deletions(-)
11    
12     diff --git a/configure.in.in b/configure.in.in
13     index ed3099b..c345c5c 100644
14     --- a/configure.in.in
15     +++ b/configure.in.in
16     @@ -64,7 +64,8 @@ XDT_I18N([@LINGUAS@])
17     dnl ***********************************
18     dnl *** Check for required packages ***
19     dnl ***********************************
20     -XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.1.3])
21     +XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.12.0])
22     +XDT_CHECK_PACKAGE([EXO], [exo-1], [0.5.0])
23     XDT_CHECK_PACKAGE([THUNARX], [thunarx-2], [1.0.1])
24     XDT_CHECK_PACKAGE([TAGLIB], [taglib], [1.4])
25    
26     diff --git a/thunar-plugin/audio-tags-page.c b/thunar-plugin/audio-tags-page.c
27     index 7e5dab5..40b226f 100644
28     --- a/thunar-plugin/audio-tags-page.c
29     +++ b/thunar-plugin/audio-tags-page.c
30     @@ -89,7 +89,6 @@ struct _AudioTagsPage
31     ThunarxPropertyPage __parent__;
32    
33     /* Widgets */
34     - GtkTooltips *tooltips;
35     GtkWidget *table;
36     GtkWidget *save_button;
37     GtkWidget *info_button;
38     @@ -281,10 +280,6 @@ audio_tags_page_init (AudioTagsPage *page)
39    
40     gtk_container_set_border_width (GTK_CONTAINER (page), 8);
41    
42     - /* Allocate the shared tooltips */
43     - page->tooltips = gtk_tooltips_new ();
44     - exo_gtk_object_ref_sink (GTK_OBJECT (page->tooltips));
45     -
46     /* Main container */
47     vbox = gtk_vbox_new (FALSE, 8);
48     gtk_container_add (GTK_CONTAINER (page), vbox);
49     @@ -316,7 +311,7 @@ audio_tags_page_init (AudioTagsPage *page)
50     /* Track spin button */
51     spin = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 0.0, 0);
52     exo_mutual_binding_new (G_OBJECT (adjustment), "value", G_OBJECT (page), "track");
53     - gtk_tooltips_set_tip (page->tooltips, spin, _("Enter the track number here."), NULL);
54     + gtk_widget_set_tooltip_text (GTK_WIDGET (spin), _("Enter the track number here."));
55     gtk_container_add (GTK_CONTAINER (alignment), spin);
56     gtk_label_set_mnemonic_widget (GTK_LABEL (label), spin);
57     gtk_widget_show (spin);
58     @@ -339,7 +334,7 @@ audio_tags_page_init (AudioTagsPage *page)
59     /* Year spin button */
60     spin = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 1, 0);
61     exo_mutual_binding_new (G_OBJECT (adjustment), "value", G_OBJECT (page), "year");
62     - gtk_tooltips_set_tip (page->tooltips, spin, _("Enter the release year here."), NULL);
63     + gtk_widget_set_tooltip_text (GTK_WIDGET (spin), _("Enter the release year here."));
64     gtk_container_add (GTK_CONTAINER (alignment), spin);
65     gtk_label_set_mnemonic_widget (GTK_LABEL (label), spin);
66     gtk_widget_show (spin);
67     @@ -354,7 +349,7 @@ audio_tags_page_init (AudioTagsPage *page)
68     /* Artist entry */
69     entry = gtk_entry_new ();
70     exo_mutual_binding_new (G_OBJECT (entry), "text", G_OBJECT (page), "artist");
71     - gtk_tooltips_set_tip (page->tooltips, entry, _("Enter the name of the artist or author of this file here."), NULL);
72     + gtk_widget_set_tooltip_text (GTK_WIDGET (entry), _("Enter the name of the artist or author of this file here."));
73     gtk_table_attach (GTK_TABLE (page->table), entry, 1, 4, 1, 2, GTK_EXPAND | GTK_FILL, 0, 0, 0);
74     gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
75     gtk_widget_show (entry);
76     @@ -369,7 +364,7 @@ audio_tags_page_init (AudioTagsPage *page)
77     /* Title entry */
78     entry = gtk_entry_new ();
79     exo_mutual_binding_new (G_OBJECT (entry), "text", G_OBJECT (page), "title");
80     - gtk_tooltips_set_tip (page->tooltips, entry, _("Enter the song title here."), NULL);
81     + gtk_widget_set_tooltip_text (GTK_WIDGET (entry), _("Enter the song title here."));
82     gtk_table_attach (GTK_TABLE (page->table), entry, 1, 4, 2, 3, GTK_EXPAND | GTK_FILL, 0, 0, 0);
83     gtk_widget_show (entry);
84    
85     @@ -383,7 +378,7 @@ audio_tags_page_init (AudioTagsPage *page)
86     /* Album entry */
87     entry = gtk_entry_new ();
88     exo_mutual_binding_new (G_OBJECT (entry), "text", G_OBJECT (page), "album");
89     - gtk_tooltips_set_tip (page->tooltips, entry, _("Enter the album/record title here."), NULL);
90     + gtk_widget_set_tooltip_text (GTK_WIDGET (entry), _("Enter the album/record title here."));
91     gtk_table_attach (GTK_TABLE (page->table), entry, 1, 4, 3, 4, GTK_EXPAND | GTK_FILL, 0, 0, 0);
92     gtk_widget_show (entry);
93    
94     @@ -397,7 +392,7 @@ audio_tags_page_init (AudioTagsPage *page)
95     /* Comment entry */
96     entry = gtk_entry_new ();
97     exo_mutual_binding_new (G_OBJECT (entry), "text", G_OBJECT (page), "comment");
98     - gtk_tooltips_set_tip (page->tooltips, entry, _("Enter your comments here."), NULL);
99     + gtk_widget_set_tooltip_text (GTK_WIDGET (entry), _("Enter your comments here."));
100     gtk_table_attach (GTK_TABLE (page->table), entry, 1, 4, 4, 5, GTK_EXPAND | GTK_FILL, 0, 0, 0);
101     gtk_widget_show (entry);
102    
103     @@ -411,7 +406,7 @@ audio_tags_page_init (AudioTagsPage *page)
104     /* Genre combo box */
105     combo = gtk_combo_box_entry_new_text ();
106     exo_mutual_binding_new (G_OBJECT (GTK_BIN (combo)->child), "text", G_OBJECT (page), "genre");
107     - gtk_tooltips_set_tip (page->tooltips, combo, _("Select or enter the genre of this song here."), NULL);
108     + gtk_widget_set_tooltip_text (GTK_WIDGET (combo), _("Select or enter the genre of this song here."));
109     gtk_table_attach (GTK_TABLE (page->table), combo, 1, 4, 5, 6, GTK_FILL, 0, 0, 0);
110     gtk_widget_show (combo);
111    
112     @@ -511,9 +506,6 @@ audio_tags_page_finalize (GObject *object)
113     if (G_LIKELY (page->genre != NULL))
114     g_free (page->genre);
115    
116     - /* Release the tooltips */
117     - g_object_unref (G_OBJECT (page->tooltips));
118     -
119     (*G_OBJECT_CLASS (audio_tags_page_parent_class)->finalize) (object);
120     }
121    
122     diff --git a/thunar-plugin/tag-renamer.c b/thunar-plugin/tag-renamer.c
123     index acb694e..bdbb17c 100644
124     --- a/thunar-plugin/tag-renamer.c
125     +++ b/thunar-plugin/tag-renamer.c
126     @@ -132,9 +132,6 @@ struct _TagRenamer
127     {
128     ThunarxRenamer __parent__;
129    
130     - /* Widgets */
131     - GtkTooltips *tooltips;
132     -
133     /* Properties */
134     TagRenamerFormat format;
135     gchar *text;
136     @@ -238,10 +235,6 @@ tag_renamer_init (TagRenamer *tag_renamer)
137     GtkTreeIter iter;
138     gint n;
139    
140     - /* Allocate shared tooltips */
141     - tag_renamer->tooltips = gtk_tooltips_new ();
142     - exo_gtk_object_ref_sink (GTK_OBJECT (tag_renamer->tooltips));
143     -
144     table = gtk_table_new (2, 4, FALSE);
145     gtk_table_set_row_spacings (GTK_TABLE (table), 6);
146     gtk_table_set_col_spacings (GTK_TABLE (table), 12);
147     @@ -320,14 +313,14 @@ tag_renamer_init (TagRenamer *tag_renamer)
148    
149     button = gtk_check_button_new_with_mnemonic (_("_Underscores"));
150     exo_mutual_binding_new (G_OBJECT (button), "active", G_OBJECT (tag_renamer), "replace-spaces");
151     - gtk_tooltips_set_tip (tag_renamer->tooltips, button, _("Activating this option will replace all spaces in the target filename "
152     - "with underscores."), NULL);
153     + gtk_widget_set_tooltip_text (GTK_WIDGET (button), _("Activating this option will replace all spaces in the target filename "
154     + "with underscores."));
155     gtk_table_attach (GTK_TABLE (table), button, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
156     gtk_widget_show (button);
157    
158     button = gtk_check_button_new_with_mnemonic (_("_Lowercase"));
159     exo_mutual_binding_new (G_OBJECT (button), "active", G_OBJECT (tag_renamer), "lowercase");
160     - gtk_tooltips_set_tip (tag_renamer->tooltips, button, _("If you activate this, the resulting filename will only contain lowercase letters."), NULL);
161     + gtk_widget_set_tooltip_text (GTK_WIDGET (button), _("If you activate this, the resulting filename will only contain lowercase letters."));
162     gtk_table_attach (GTK_TABLE (table), button, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
163     gtk_widget_show (button);
164     }
165     @@ -341,9 +334,6 @@ tag_renamer_finalize (GObject *object)
166     {
167     TagRenamer *tag_renamer = TAG_RENAMER (object);
168    
169     - /* release the tooltips */
170     - g_object_unref (G_OBJECT (tag_renamer->tooltips));
171     -
172     /* Free string */
173     g_free (tag_renamer->text);
174    
175     --
176     1.6.3.3
177