[gnome-nibbles] Use a GtkHeaderBar
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles] Use a GtkHeaderBar
- Date: Sun, 16 Feb 2014 15:12:35 +0000 (UTC)
commit f6f090fc3b747896ca26686a21f42bd0e3d78395
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sun Feb 2 19:12:50 2014 -0600
Use a GtkHeaderBar
https://bugzilla.gnome.org/show_bug.cgi?id=722226
src/main.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 6a680cb..778402a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -581,6 +581,7 @@ static void
activate (GtkApplication* app,
gpointer user_data)
{
+ GtkWidget *headerbar;
GtkWidget *window;
GtkWidget *label;
GdkGeometry size_hints = {
@@ -594,8 +595,15 @@ activate (GtkApplication* app,
GtkBuilder *builder;
+ headerbar = gtk_header_bar_new ();
+ gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (headerbar), TRUE);
+ gtk_header_bar_set_title (GTK_HEADER_BAR (headerbar), _("Nibbles"));
+ gtk_widget_show (headerbar);
+
window = gtk_application_window_new (app);
+ gtk_window_set_titlebar (GTK_WINDOW (window), headerbar);
+
gtk_window_set_geometry_hints (GTK_WINDOW (window),
window,
&size_hints,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]