[gtk+] Pimp up testheaderbar some more



commit 7069f6a251bae6bf549d6ea7c9e43bd6d851c325
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Mar 26 20:46:13 2013 -0400

    Pimp up testheaderbar some more

 tests/testheaderbar.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/tests/testheaderbar.c b/tests/testheaderbar.c
index 05e44a8..cfee8d4 100644
--- a/tests/testheaderbar.c
+++ b/tests/testheaderbar.c
@@ -59,6 +59,7 @@ main (int argc, char *argv[])
   GtkWidget *header;
   GtkWidget *footer;
   GtkWidget *button;
+  GtkWidget *image;
   GtkWidget *content;
   GtkCssProvider *provider;
 
@@ -77,10 +78,17 @@ main (int argc, char *argv[])
   gtk_header_bar_set_title (GTK_HEADER_BAR (header), "Example header");
 
   button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
+  gtk_style_context_add_class (gtk_widget_get_style_context (button), "suggested-action");
   g_signal_connect (button, "clicked", G_CALLBACK (gtk_main_quit), NULL);
 
   gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
 
+  button = gtk_button_new ();
+  image = gtk_image_new_from_icon_name ("bookmark-new-symbolic", GTK_ICON_SIZE_BUTTON);
+  gtk_container_add (GTK_CONTAINER (button), image);
+
+  gtk_header_bar_pack_start (GTK_HEADER_BAR (header), button);
+
   gtk_window_set_titlebar (GTK_WINDOW (window), header);
 
   box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]