Merge lp:~gabor-karsay/awn-extras/build-fixes into lp:awn-extras

Proposed by Gabor Karsay
Status: Merged
Merged at revision: 1438
Proposed branch: lp:~gabor-karsay/awn-extras/build-fixes
Merge into: lp:awn-extras
Diff against target: 125 lines (+13/-12)
3 files modified
.bzrignore (+1/-0)
applets/maintained/awnterm/awn-terminal.vala (+11/-11)
applets/maintained/places/applet.c (+1/-1)
To merge this branch: bzr merge lp:~gabor-karsay/awn-extras/build-fixes
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
Review via email: mp+32634@code.launchpad.net

Description of the change

1. This branch adds the generated *.c files from Digital Clock, which is a Vala applet, to .bzrignore just like the other Vala applets do.

2. It fixes a small compiler warning in Places: expected ‘struct GtkMenu *’ but argument is of type ‘struct GtkWidget *’

3. Fixes a compiler warning in Awn Terminal: The gettext macro _ has to be changed to Gettext._
After that, <glib/gi18n-lib.h> is not included in the .c-file but <glib/gi18n.h> still is. There were warnings, that one redefined the functions of the other.

To post a comment you must log in.
Revision history for this message
Michal Hruby (mhr3) wrote :

Sorry, missed this review... But it looks good, thanks Gabor!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2010-02-22 05:31:00 +0000
3+++ .bzrignore 2010-08-13 22:02:40 +0000
4@@ -36,6 +36,7 @@
5 py-compile
6 stamp-h1
7 applets/maintained/awnterm/awn-terminal.c
8+applets/maintained/digital-clock/*.c
9 applets/maintained/garbage/*.c
10 applets/maintained/notification-area/na-prefs.c
11 applets/maintained/notification-area/notification-area.c
12
13=== modified file 'applets/maintained/awnterm/awn-terminal.vala'
14--- applets/maintained/awnterm/awn-terminal.vala 2010-03-25 11:01:44 +0000
15+++ applets/maintained/awnterm/awn-terminal.vala 2010-08-13 22:02:40 +0000
16@@ -97,7 +97,7 @@
17 {
18 this.model.set (iter, 1,
19 this._keybinding != null && this._keybinding.size () > 0 ?
20- this._keybinding : _ ("Disabled"));
21+ this._keybinding : Gettext._ ("Disabled"));
22 }
23 }
24 }
25@@ -407,7 +407,7 @@
26 }
27
28 this.prefs_window = new Gtk.Window (Gtk.WindowType.TOPLEVEL);
29- this.prefs_window.set_title (_ ("Preferences"));
30+ this.prefs_window.set_title (Gettext._ ("Preferences"));
31 this.prefs_window.set_default_icon_name ("terminal");
32 this.prefs_window.set_border_width (6);
33
34@@ -422,7 +422,7 @@
35 this.prefs_window.add (box);
36
37 Gtk.Widget widget = new Gtk.Label ("");
38- (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (_ ("Behavior")));
39+ (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (Gettext._ ("Behavior")));
40 (widget as Gtk.Label).set_alignment (0.0f, 0.5f);
41 box.pack_start (widget, false, false, 0);
42
43@@ -434,7 +434,7 @@
44 align.add (box2);
45
46 // focus out behavior checkbox
47- widget = new Gtk.CheckButton.with_label (_ ("Hide when focus is lost"));
48+ widget = new Gtk.CheckButton.with_label (Gettext._ ("Hide when focus is lost"));
49 (widget as CheckButton).set_active (this.hide_on_unfocus);
50 (widget as CheckButton).toggled.connect ((w) =>
51 {
52@@ -453,7 +453,7 @@
53 treeview.set_model (this.model);
54
55 ren = new CellRendererText ();
56- col = new TreeViewColumn.with_attributes (_ ("Action"), ren, "text", 0);
57+ col = new TreeViewColumn.with_attributes (Gettext._ ("Action"), ren, "text", 0);
58 treeview.append_column (col);
59
60 ren = new CellRendererAccel ();
61@@ -473,13 +473,13 @@
62 {
63 this.keybinding = "";
64 });
65- col = new TreeViewColumn.with_attributes (_ ("Shortcut"), ren, "text",1);
66+ col = new TreeViewColumn.with_attributes (Gettext._ ("Shortcut"), ren, "text",1);
67 treeview.append_column (col);
68
69 // add the actual item
70 Gtk.TreeIter iter;
71 this.model.append (out iter);
72- this.model.set (iter, 0, _ ("Activate"));
73+ this.model.set (iter, 0, Gettext._ ("Activate"));
74 // this will set the keybinding in the model
75 this.keybinding = this._keybinding;
76
77@@ -488,7 +488,7 @@
78 box.pack_start (section_box, false, false, 0);
79
80 widget = new Gtk.Label ("");
81- (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (_ ("Background image")));
82+ (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (Gettext._ ("Background image")));
83 (widget as Gtk.Label).set_alignment (0.0f, 0.5f);
84 section_box.pack_start (widget, false, false, 0);
85
86@@ -500,7 +500,7 @@
87 align.add (box2);
88
89 this.preview_image = new Gtk.Image ();
90- this.chooser = new Gtk.FileChooserButton (_ ("Select a file"),
91+ this.chooser = new Gtk.FileChooserButton (Gettext._ ("Select a file"),
92 Gtk.FileChooserAction.OPEN);
93 this.chooser.set_filename (this.background_image);
94 this.chooser.set_preview_widget (this.preview_image);
95@@ -542,7 +542,7 @@
96 box.pack_start (section_box, false, false, 0);
97
98 widget = new Gtk.Label ("");
99- (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (_ ("Terminal opacity")));
100+ (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (Gettext._ ("Terminal opacity")));
101 (widget as Gtk.Label).set_alignment (0.0f, 0.5f);
102 section_box.pack_start (widget, false, false, 3);
103
104@@ -569,7 +569,7 @@
105 box.pack_start (section_box, false, false, 0);
106
107 widget = new Gtk.Label ("");
108- (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (_ ("External Terminal")));
109+ (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (Gettext._ ("External Terminal")));
110 (widget as Gtk.Label).set_alignment (0.0f, 0.5f);
111 section_box.pack_start (widget, false, false, 3);
112
113
114=== modified file 'applets/maintained/places/applet.c'
115--- applets/maintained/places/applet.c 2010-04-09 23:18:24 +0000
116+++ applets/maintained/places/applet.c 2010-08-13 22:02:40 +0000
117@@ -1204,7 +1204,7 @@
118 AWN_APPLET_LICENSE_GPLV2,
119 VERSION);
120 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
121- awn_utils_show_menu_images (menu);
122+ awn_utils_show_menu_images (GTK_MENU(menu));
123 }
124
125 gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event_button->button, event_button->time);

Subscribers

People subscribed via source and target branches