static void
bus_name_service_free (BusNameService *service)
{
- GSList *list = NULL;
-
g_assert (service != NULL);
g_slist_free_full (service->owners,
void print_usage(FileStream stream) {
stream.printf(_("Usage: %s COMMAND [OPTION...]\n\n"), program_name);
stream.printf(_("Commands:\n"));
- foreach (var command in commands) {
- stream.printf(" %s\n", command.name);
+ for (int i = 0; i < commands.length; i++) {
+ stream.printf(" %s\n", commands[i].name);
}
}
}
string[] new_argv = argv[1:argv.length];
- foreach (var command in commands) {
- if (command.name == argv[1])
- return command.entry(new_argv);
+ for (int i = 0; i < commands.length; i++) {
+ if (commands[i].name == argv[1])
+ return commands[i].entry(new_argv);
}
stderr.printf(_("%s is unknown command!\n"), argv[1]);
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);
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);
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 = {};
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);
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;
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);
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;
}
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;