~robru/gwibber/3.4-twitter-1.1

« back to all changes in this revision

Viewing changes to libgwibber-gtk/entry.vala

  • Committer: Ken VanDine
  • Date: 2012-06-11 03:57:31 UTC
  • Revision ID: ken.vandine@canonical.com-20120611035731-dim3k112h0vzg0w3
Tags: 3.4.2
libgwibber-gtk: Fixed up the GwibberGtkEntry widget's alignment and icon 
search path (LP: #1011392)

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
 
38
38
        construct
39
39
        {
 
40
            set_orientation (Gtk.Orientation.VERTICAL);
40
41
            service = new Gwibber.Service ();
41
42
 
42
43
            text_view = new InputTextView (service);
43
44
            target_bar = new AccountTargetBar ();
44
 
            add (text_view);
45
 
            add_with_properties(target_bar,"expand", false);
 
45
            add_with_properties (text_view,"expand", true);
 
46
            add_with_properties (target_bar,"expand", false);
 
47
 
46
48
            text_view.show ();
47
49
            target_bar.show ();
48
50
            target_bar.send.clicked.connect(() => {
125
127
            Gtk.BindingEntry.add_signal (binding_set, Gdk.keyval_from_name ("Return"), 0, "submit", 0);
126
128
            Gtk.BindingEntry.add_signal (binding_set, Gdk.keyval_from_name ("KP_Enter"), 0, "submit", 0);
127
129
            Gtk.BindingEntry.add_signal (binding_set, Gdk.keyval_from_name ("Escape"), 0, "clear", 0);
128
 
            fg_color = get_style ().fg[Gtk.StateType.NORMAL];
 
130
            fg_color = get_style ().text[Gtk.StateType.NORMAL];
129
131
 
130
132
            Gdk.Color.parse ("indianred", out error_color);
131
133
 
335
337
 
336
338
        construct
337
339
        {
 
340
            var icon_theme = Gtk.IconTheme.get_default ();
 
341
            icon_theme.prepend_search_path (Config.PKGDATADIR + "/ui/icons");
 
342
            // Prepend local icon path if running from a source checkout
 
343
            var local_icon_path = GLib.Path.build_path (Path.DIR_SEPARATOR_S, Environment.get_current_dir (), "data/icons");
 
344
            if (GLib.FileUtils.test (local_icon_path, GLib.FileTest.IS_DIR))
 
345
              icon_theme.prepend_search_path (local_icon_path);
 
346
            local_icon_path = GLib.Path.build_path (Path.DIR_SEPARATOR_S, Environment.get_current_dir (), "../data/icons");
 
347
            if (GLib.FileUtils.test (local_icon_path, GLib.FileTest.IS_DIR))
 
348
              icon_theme.prepend_search_path (local_icon_path);
 
349
 
338
350
            accounts_service = new Gwibber.Accounts();
339
351
            conn_service = new Gwibber.Connection ();
340
352
            // Add buttons to button area at the bottom