~noskcaj/ubuntu/trusty/gthumb/3.2.5

« back to all changes in this revision

Viewing changes to gthumb/gth-menu-button.c

  • Committer: Package Import Robot
  • Author(s): David Paleino
  • Date: 2011-12-22 22:40:29 UTC
  • mfrom: (5.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20111222224029-l58g65u1nfa6ojtg
Tags: 3:2.14.1-1
* New upstream version (Closes: #652692)
* Patches refreshed
* Bump build-dependencies requirements
* Fix FTBFS, added missing #include
* debian/watch fixed to point to new location (.xz tarballs)

Show diffs side-by-side

added added

removed removed

Lines of Context:
330
330
static void
331
331
gth_menu_button_init (GthMenuButton *self)
332
332
{
333
 
        guint      image_spacing;
334
 
        GtkWidget *arrow;
335
 
        GtkWidget *arrow_align;
336
 
        GtkWidget *main_box;
337
 
        GtkWidget *box;
 
333
        GtkSettings *settings;
 
334
        gboolean     show_image;
 
335
        guint        image_spacing;
 
336
        GtkWidget   *arrow;
 
337
        GtkWidget   *arrow_align;
 
338
        GtkWidget   *main_box;
 
339
        GtkWidget   *box;
338
340
 
339
341
        self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GTH_TYPE_MENU_BUTTON, GthMenuButtonPrivate);
340
342
        self->priv->menu = NULL;
347
349
        /* icon and label */
348
350
 
349
351
        self->priv->icon_widget = gtk_image_new ();
350
 
        gtk_widget_show (self->priv->icon_widget);
 
352
 
 
353
        settings = gtk_widget_get_settings (GTK_WIDGET (self));
 
354
        g_object_get (settings, "gtk-button-images", &show_image, NULL);
 
355
        if (show_image)
 
356
                gtk_widget_show (self->priv->icon_widget);
 
357
        else
 
358
                gtk_widget_hide (self->priv->icon_widget);
351
359
 
352
360
        self->priv->label_widget = gtk_label_new (NULL);
353
361
        gtk_widget_show (self->priv->label_widget);
445
453
}
446
454
 
447
455
 
448
 
G_CONST_RETURN char *
 
456
const char *
449
457
gth_menu_button_get_label (GthMenuButton *self)
450
458
{
451
459
        g_return_val_if_fail (GTH_IS_MENU_BUTTON (self), NULL);
496
504
}
497
505
 
498
506
 
499
 
G_CONST_RETURN char *
 
507
const char *
500
508
gth_menu_button_get_stock_id (GthMenuButton *self)
501
509
{
502
510
        char *stock_id;
522
530
}
523
531
 
524
532
 
525
 
G_CONST_RETURN char *
 
533
const char *
526
534
gth_menu_button_get_icon_name (GthMenuButton *self)
527
535
{
528
536
        const char *icon_name;