Skip to content

Commit

Permalink
Fix some build warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
phuangg authored and fujiwarat committed Nov 13, 2012
1 parent bb5b979 commit 93b7208
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
14 changes: 8 additions & 6 deletions ui/gtk3/candidatearea.vala
Expand Up @@ -137,10 +137,12 @@ class CandidateArea : Gtk.Box {

if (m_vertical) {
// Add Candidates
Gtk.HBox candidates_hbox = new Gtk.HBox(false, 0);
Gtk.Box candidates_hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
pack_start(candidates_hbox, false, false, 0);
Gtk.VBox labels_vbox = new Gtk.VBox(true, 0);
Gtk.VBox candidates_vbox = new Gtk.VBox(true, 0);
Gtk.Box labels_vbox = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
labels_vbox.set_homogeneous(true);
Gtk.Box candidates_vbox = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
candidates_vbox.set_homogeneous(true);
candidates_hbox.pack_start(labels_vbox, false, false, 4);
candidates_hbox.pack_start(new VSeparator(), false, false, 0);
candidates_hbox.pack_start(candidates_vbox, true, true, 4);
Expand All @@ -149,7 +151,7 @@ class CandidateArea : Gtk.Box {
pack_start(new HSeparator(), false, false, 0);

// Add buttons
Gtk.HBox buttons_hbox = new Gtk.HBox(false, 0);
Gtk.Box buttons_hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
Gtk.Label state_label = new Gtk.Label(null);
state_label.set_size_request(20, -1);
buttons_hbox.pack_start(state_label, true, true, 0);
Expand Down Expand Up @@ -198,7 +200,7 @@ class CandidateArea : Gtk.Box {
m_widgets += candidate_ebox;
}
} else {
Gtk.HBox hbox = new Gtk.HBox(false, 0);
Gtk.Box hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
add(hbox);

m_labels = {};
Expand All @@ -215,7 +217,7 @@ class CandidateArea : Gtk.Box {
candidate.show();
m_candidates += candidate;

Gtk.HBox candidate_hbox = new Gtk.HBox(false, 0);
Gtk.Box candidate_hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
candidate_hbox.show();
candidate_hbox.pack_start(label, false, false, 2);
candidate_hbox.pack_start(candidate, false, false, 2);
Expand Down
4 changes: 2 additions & 2 deletions ui/gtk3/candidatepanel.vala
Expand Up @@ -24,7 +24,7 @@
public class CandidatePanel : Gtk.HBox{
private bool m_vertical = true;
private Gtk.Window m_toplevel;
private Gtk.VBox m_vbox;
private Gtk.Box m_vbox;

private Gtk.Label m_preedit_label;
private Gtk.Label m_aux_label;
Expand Down Expand Up @@ -61,7 +61,7 @@ public class CandidatePanel : Gtk.HBox{
handle.set_visible(true);
pack_start(handle, false, false, 0);

m_vbox = new Gtk.VBox(false, 0);
m_vbox = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
m_vbox.set_visible(true);
pack_start(m_vbox, false, false, 0);

Expand Down
6 changes: 4 additions & 2 deletions ui/gtk3/keybindingmanager.vala
Expand Up @@ -131,7 +131,8 @@ public class KeybindingManager : GLib.Object {
Gdk.ModifierType.SHIFT_MASK,
Gdk.ModifierType.LOCK_MASK
};
foreach (Gdk.ModifierType mask in masks) {
for (int i = 0; i < masks.length; i++) {
Gdk.ModifierType mask = masks[i];
if ((binding_mask & mask) == mask)
return mask;
}
Expand Down Expand Up @@ -215,7 +216,8 @@ public class KeybindingManager : GLib.Object {
X.KeyMask.Mod5Mask
};
int[] masks = {};
foreach (var modifier in ignored_modifiers) {
for (int i = 0; i < ignored_modifiers.length; i++) {
int modifier = ignored_modifiers[i];
masks += modifier;

int length = masks.length;
Expand Down

0 comments on commit 93b7208

Please sign in to comment.