gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r11821 - in gnunet-gtk: contrib src


From: gnunet
Subject: [GNUnet-SVN] r11821 - in gnunet-gtk: contrib src
Date: Sun, 20 Jun 2010 11:16:15 +0200

Author: grothoff
Date: 2010-06-20 11:16:15 +0200 (Sun, 20 Jun 2010)
New Revision: 11821

Added:
   gnunet-gtk/contrib/publish_tab.glade
Modified:
   gnunet-gtk/contrib/Makefile.am
   gnunet-gtk/src/fs_event_handler.c
Log:
designing publish tab

Modified: gnunet-gtk/contrib/Makefile.am
===================================================================
--- gnunet-gtk/contrib/Makefile.am      2010-06-20 09:01:15 UTC (rev 11820)
+++ gnunet-gtk/contrib/Makefile.am      2010-06-20 09:16:15 UTC (rev 11821)
@@ -17,6 +17,7 @@
   publish-directory-dialog.glade \
   publish_edit_dialog.glade \
   publish-file-dialog.glade \
+  publish_tab.glade \
   search_dialog.glade \
   search_tab.glade \
   status_bar_menu.glade 

Added: gnunet-gtk/contrib/publish_tab.glade
===================================================================
--- gnunet-gtk/contrib/publish_tab.glade                                (rev 0)
+++ gnunet-gtk/contrib/publish_tab.glade        2010-06-20 09:16:15 UTC (rev 
11821)
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <requires lib="gtk+" version="2.20"/>
+  <!-- interface-naming-policy project-wide -->
+  <object class="GtkTreeStore" id="_publish_frame_tree_store">
+    <columns>
+      <!-- column-name filename -->
+      <column type="gchararray"/>
+      <!-- column-name filesize -->
+      <column type="gchararray"/>
+      <!-- column-name bgcolour -->
+      <column type="gchararray"/>
+      <!-- column-name progress -->
+      <column type="guint"/>
+    </columns>
+  </object>
+  <object class="GtkWindow" id="_publish_label_window">
+    <child>
+      <object class="GtkHBox" id="_publish_label_hbox">
+        <property name="visible">True</property>
+        <property name="border_width">5</property>
+        <child>
+          <object class="GtkLabel" id="_publish_label_window_label">
+            <property name="height_request">30</property>
+            <property name="visible">True</property>
+            <property name="label" translatable="yes">filename</property>
+          </object>
+          <packing>
+            <property name="fill">False</property>
+            <property name="padding">5</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="_publish_label_close_button">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="relief">half</property>
+            <child>
+              <object class="GtkImage" id="close_icon_stock_image">
+                <property name="visible">True</property>
+                <property name="stock">gtk-close</property>
+                <property name="icon-size">2</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkWindow" id="_publish_frame_window">
+    <property name="title">You should never see this</property>
+    <child>
+      <object class="GtkTreeView" id="_publish_frame">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="model">_publish_frame_tree_store</property>
+        <property name="reorderable">True</property>
+        <property name="enable_tree_lines">True</property>
+        <child>
+          <object class="GtkTreeViewColumn" id="filename">
+            <property name="sizing">autosize</property>
+            <property name="title" translatable="yes">Filename</property>
+            <property name="expand">True</property>
+            <child>
+              <object class="GtkCellRendererProgress" id="filename_renderer"/>
+              <attributes>
+                <attribute name="cell-background-gdk">2</attribute>
+                <attribute name="text">0</attribute>
+                <attribute name="value">3</attribute>
+              </attributes>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkTreeViewColumn" id="filesize">
+            <property name="sizing">autosize</property>
+            <property name="title" translatable="yes">Size</property>
+            <child>
+              <object class="GtkCellRendererText" id="size_renderer"/>
+              <attributes>
+                <attribute name="background-gdk">2</attribute>
+                <attribute name="text">1</attribute>
+              </attributes>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>

Modified: gnunet-gtk/src/fs_event_handler.c
===================================================================
--- gnunet-gtk/src/fs_event_handler.c   2010-06-20 09:01:15 UTC (rev 11820)
+++ gnunet-gtk/src/fs_event_handler.c   2010-06-20 09:16:15 UTC (rev 11821)
@@ -48,11 +48,19 @@
 };
 
 
-static struct SearchTab *open_head;
+static struct SearchTab *search_tab_head;
 
-static struct SearchTab *open_tail;
+static struct SearchTab *search_tab_tail;
 
+struct PublishTab
+{
+  struct PublishTab *next;
+  struct PublishTab *prev;
+  struct GNUNET_FS_PublishContext *pc;
+  GtkBuilder *builder;
+};
 
+//static struct PublishTab *p
 
 struct SearchResult 
 {
@@ -443,8 +451,8 @@
   gtk_notebook_remove_page (notebook, index);
   g_object_unref (tab->builder);
   GNUNET_free (tab->query_txt);
-  GNUNET_CONTAINER_DLL_remove (open_head,
-                              open_tail,
+  GNUNET_CONTAINER_DLL_remove (search_tab_head,
+                              search_tab_tail,
                               tab);
   GNUNET_free (tab);
 }
@@ -519,8 +527,8 @@
   gint pages;
 
   tab = GNUNET_malloc (sizeof (struct SearchTab));
-  GNUNET_CONTAINER_DLL_insert (open_head,
-                              open_tail,
+  GNUNET_CONTAINER_DLL_insert (search_tab_head,
+                              search_tab_tail,
                               tab);
   tab->sc = sc;
   if (GNUNET_FS_uri_test_ksk (query))
@@ -955,7 +963,7 @@
   notebook = GTK_NOTEBOOK (GNUNET_GTK_get_main_window_object 
("GNUNET_GTK_main_window_notebook"));
   page = gtk_notebook_get_current_page (notebook);
   w = gtk_notebook_get_nth_page (notebook, page);
-  tab = open_head;
+  tab = search_tab_head;
   while (tab != NULL)
     {
       if (tab->frame == w)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]