[gtk+/wip/csoriano/pathbar-prototype] prototype



commit 57021fae71e4b6ae8f607914b41a8029b8262e82
Author: Carlos Soriano <csoriano gnome org>
Date:   Thu Oct 22 20:16:26 2015 +0200

    prototype

 gtk/ui/gtkpathbarobjects.ui |   15 +++++++++++++++
 tests/testpathbar.c         |   30 ++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 0 deletions(-)
---
diff --git a/gtk/ui/gtkpathbarobjects.ui b/gtk/ui/gtkpathbarobjects.ui
new file mode 100644
index 0000000..24c2454
--- /dev/null
+++ b/gtk/ui/gtkpathbarobjects.ui
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface domain="gtk30">
+  <object class="GtkLabel" id="separator">
+    <property name="visible">true</property>
+    <property name="label">/</property>
+    <property name="sensitive">false</property>
+  </object>
+  <object class="GtkButton" id="path_chunk_button">
+    <property name="visible">true</property>
+    <signal name="clicked" handler="on_path_chunk_button_clicked" object="GtkPathBar" swapped="yes"/>
+    <style>
+      <class name="image-button"/>
+    </style>
+  </object>
+</interface>
diff --git a/tests/testpathbar.c b/tests/testpathbar.c
new file mode 100644
index 0000000..88d80cf
--- /dev/null
+++ b/tests/testpathbar.c
@@ -0,0 +1,30 @@
+#include "config.h"
+#include <gtk/gtk.h>
+
+int
+main (int argc, char *argv[])
+{
+  GtkWidget *window;
+  GtkWidget *path_bar;
+
+  gtk_init (&argc, &argv);
+
+  window = g_object_connect (g_object_new (gtk_window_get_type (),
+                                           "type", GTK_WINDOW_TOPLEVEL,
+                                           "title", "Test path bar",
+                                           "resizable", TRUE,
+                                           "border_width", 10,
+                                           NULL),
+                             "signal::destroy", gtk_main_quit, NULL,
+                             NULL);
+
+  g_type_ensure (GTK_TYPE_PATH_BAR);
+  path_bar = gtk_path_bar_new ();
+  gtk_container_add (GTK_CONTAINER (window), path_bar);
+  gtk_path_bar_set_path (path_bar, "/test/test 2/pppppppppp/asda lkasdl/// alskd/");
+  gtk_widget_show_all (window);
+
+  gtk_main ();
+
+  return 0;
+}


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