~seriy-pr/gwibber/vkontakte-ru-plugin

« back to all changes in this revision

Viewing changes to libgwibber-gtk/user-view-tile.vala

  • Committer: Sergey Prokhorov
  • Date: 2012-03-16 22:58:30 UTC
  • mfrom: (932.1.385 trunk)
  • Revision ID: root@seriyps.ru-20120316225830-bt9n2r8evmknoixa
merged with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
      close_box.set_visible_window (false);
77
77
 
78
78
      close_box.add (close_icon);
79
 
      ralignment.add (close_box);
 
79
      lalignment.add (close_box);
80
80
    }
81
81
 
82
82
    [Signal (action=true)]
163
163
    private Gtk.Label  followers;
164
164
    private Gtk.Label  friends;
165
165
    private Gtk.Image  protected;
166
 
    private Gtk.Image  service;
 
166
    private Gtk.Image  service_icon;
167
167
    private Gtk.Label  statuses;
168
168
    private Gwibber.Utils utils;
169
169
    private Gtk.Box follower_box;
208
208
 
209
209
      icon_box = new Gtk.EventBox ();
210
210
      icon_box.set_visible_window (false);
211
 
      icon = new Gtk.Image.from_icon_name ("stock_person", Gtk.IconSize.DIALOG);
 
211
      icon = new Gtk.Image.from_icon_name ("gwibber-avatar", Gtk.IconSize.DIALOG);
212
212
      icon_box.add(icon);
213
213
      lalignment.add (icon_box);
214
214
 
226
226
      var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
227
227
      vbox.pack_start (hbox, false, false, 2);
228
228
 
229
 
      service = new Gtk.Image.from_icon_name ("gwibber", Gtk.IconSize.MENU);
230
 
      service.set_no_show_all (true);
231
 
      hbox.pack_start (service, false, false, 2);
 
229
      service_icon = new Gtk.Image.from_icon_name ("gwibber", Gtk.IconSize.MENU);
 
230
      service_icon.set_no_show_all (true);
 
231
      hbox.pack_start (service_icon, false, false, 2);
232
232
 
233
233
      name = new Gtk.Label ("");
234
234
      name.set_markup ("<b></b>");
238
238
      name.set_alignment (0.0f, 0.5f);
239
239
      hbox.pack_start (name, false, false, 0);
240
240
 
241
 
      protected = new Gtk.Image.from_icon_name ("stock_lock", Gtk.IconSize.MENU);
 
241
      protected = new Gtk.Image.from_icon_name ("gwibber-lock", Gtk.IconSize.MENU);
242
242
      protected.set_no_show_all (true);
243
243
      hbox.pack_start (protected, false, false, 0);
244
244
 
345
345
      if (_avatar_cache_image != null)
346
346
        icon.set_from_file(_avatar_cache_image);
347
347
      else
348
 
        icon.set_from_icon_name ("stock_person", Gtk.IconSize.DIALOG);
 
348
        icon.set_from_icon_name ("gwibber-avatar", Gtk.IconSize.DIALOG);
349
349
 
350
350
      if (follow_but.get_active () != _following);
351
351
        follow_but.set_active (_following);
352
352
      follow_but.toggled.connect (() => {
353
353
        var service = new Gwibber.Service ();
354
 
        service.follow (_account, _sender_nick, follow_but.get_active ());
 
354
        try
 
355
        {
 
356
          service.follow (_account, _sender_nick, follow_but.get_active ());
 
357
        }
 
358
        catch (Error e)
 
359
        {
 
360
        }
355
361
        // wait a moment so twitter records the follow/unfollow operation
356
362
        Timeout.add_seconds(10, () => {
357
 
          service.perform(_id);
 
363
          try
 
364
          {
 
365
            service.perform(_id);
 
366
          }
 
367
          catch (Error e)
 
368
          {
 
369
          }
358
370
          return false;
359
371
        });
360
372
      });
364
376
      else
365
377
        protected.hide ();
366
378
 
367
 
      var service_icon = GLib.Path.build_filename (Config.PKGDATADIR, "ui/icons/breakdance/16x16/" + _service + ".png");
368
 
      service.set_from_file(service_icon);
369
 
      service.show ();
 
379
      Gtk.Image service_icon = new Gtk.Image.from_icon_name(_service, Gtk.IconSize.MENU);
 
380
      service_icon.show ();
370
381
    }
371
382
  }
372
383
}