[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r11827 - in gnunet-gtk: contrib src
From: |
gnunet |
Subject: |
[GNUnet-SVN] r11827 - in gnunet-gtk: contrib src |
Date: |
Sun, 20 Jun 2010 14:13:31 +0200 |
Author: grothoff
Date: 2010-06-20 14:13:31 +0200 (Sun, 20 Jun 2010)
New Revision: 11827
Modified:
gnunet-gtk/contrib/publish_tab.glade
gnunet-gtk/src/fs_event_handler.c
Log:
fixes
Modified: gnunet-gtk/contrib/publish_tab.glade
===================================================================
--- gnunet-gtk/contrib/publish_tab.glade 2010-06-20 11:48:09 UTC (rev
11826)
+++ gnunet-gtk/contrib/publish_tab.glade 2010-06-20 12:13:31 UTC (rev
11827)
@@ -2,17 +2,45 @@
<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 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">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">2</attribute>
+ <attribute name="text">1</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
<object class="GtkWindow" id="_publish_label_window">
<child>
@@ -55,44 +83,16 @@
</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 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>
</interface>
Modified: gnunet-gtk/src/fs_event_handler.c
===================================================================
--- gnunet-gtk/src/fs_event_handler.c 2010-06-20 11:48:09 UTC (rev 11826)
+++ gnunet-gtk/src/fs_event_handler.c 2010-06-20 12:13:31 UTC (rev 11827)
@@ -126,7 +126,12 @@
{
GtkTreeIter iter;
GtkTreePath *path;
-
+
+ if (pe == NULL)
+ {
+ GNUNET_break (0);
+ return NULL;
+ }
path = gtk_tree_row_reference_get_path (pe->rr);
if (TRUE != gtk_tree_model_get_iter (GTK_TREE_MODEL (pe->tab->ts),
&iter, path))
@@ -530,6 +535,11 @@
int index;
int i;
+ if (ent == NULL)
+ {
+ GNUNET_break (0);
+ return;
+ }
gtk_tree_row_reference_free (ent->rr);
if (GNUNET_YES != ent->is_top)
{
@@ -903,6 +913,7 @@
gpointer user_data)
{
struct PublishTab *tab = user_data;
+
if (tab->pc != NULL)
{
GNUNET_FS_publish_stop (tab->pc);
@@ -941,7 +952,7 @@
tab);
tab->builder = GNUNET_GTK_get_new_builder ("publish_tab.glade");
df = GTK_WINDOW (gtk_builder_get_object (tab->builder,
- "_search_result_frame_window"));
+ "_publish_frame_window"));
tab->frame = gtk_bin_get_child (GTK_BIN (df));
gtk_widget_ref (tab->frame);
gtk_container_remove (GTK_CONTAINER (df), tab->frame);
@@ -972,7 +983,7 @@
pages - 1);
gtk_widget_show (GTK_WIDGET (notebook));
tab->ts = GTK_TREE_STORE (gtk_builder_get_object (tab->builder,
-
"_publish_tree_store"));
+
"_publish_frame_tree_store"));
pitrptr = NULL;
}
else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r11827 - in gnunet-gtk: contrib src,
gnunet <=