[Xfce4-commits] r23703 - in xarchiver/branches/xarchiver-psybsd: . src
Stephan Arts
stephan at xfce.org
Sat Nov 4 22:42:22 CET 2006
Author: stephan
Date: 2006-11-04 21:42:20 +0000 (Sat, 04 Nov 2006)
New Revision: 23703
Modified:
xarchiver/branches/xarchiver-psybsd/TODO
xarchiver/branches/xarchiver-psybsd/src/path_bar.c
Log:
Changed stuff to path-bar
updated TODO
Modified: xarchiver/branches/xarchiver-psybsd/TODO
===================================================================
--- xarchiver/branches/xarchiver-psybsd/TODO 2006-11-04 21:28:46 UTC (rev 23702)
+++ xarchiver/branches/xarchiver-psybsd/TODO 2006-11-04 21:42:20 UTC (rev 23703)
@@ -11,9 +11,9 @@
Make thunar-vfs dependency optional.
Make libxfce4-util dependency optional.
- Fix navigation-bars to work with notebook
+ Fix navigation-bars to work with notebook - DONE (Pathbar untested)
- Close Buttons
+ Close Buttons - DONE
Fix Command-line options
@@ -25,6 +25,8 @@
Settings support
+ Non-default actions
+
Comment library functions
(explain their purpose)
Modified: xarchiver/branches/xarchiver-psybsd/src/path_bar.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/path_bar.c 2006-11-04 21:28:46 UTC (rev 23702)
+++ xarchiver/branches/xarchiver-psybsd/src/path_bar.c 2006-11-04 21:42:20 UTC (rev 23703)
@@ -698,5 +698,49 @@
static void
cb_xa_path_bar_store_set(XANavigationBar *bar)
{
+ GtkRadioButton *button = NULL;
+ XAPathBar *path_bar = XA_PATH_BAR(bar);
+ GSList *buttons = path_bar->path_button->next;
+
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(path_bar->path_button->data), TRUE);
+
+ while(buttons)
+ {
+ gtk_container_remove(GTK_CONTAINER(path_bar), GTK_WIDGET(buttons->data));
+ gtk_widget_unref(GTK_WIDGET(buttons->data));
+ buttons = buttons->next;
+ }
+ g_slist_free(path_bar->path_button->next);
+ path_bar->path_button->next = NULL;
+
+ if(bar->store)
+ {
+ GSList *path = xa_archive_store_get_pwd_list(bar->store);
+ GSList *iter = path;
+
+ while(iter)
+ {
+ button = GTK_RADIO_BUTTON(gtk_radio_button_new_with_label(path_bar->path_button, (const gchar*)iter->data));
+ gtk_widget_ref(GTK_WIDGET(button));
+ gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(button), FALSE);
+ path_bar->path_button = g_slist_append(path_bar->path_button, button);
+
+ g_signal_connect(G_OBJECT(button), "clicked", (GCallback)cb_xa_path_bar_path_button_clicked, path_bar);
+
+ gtk_container_add(GTK_CONTAINER(path_bar), GTK_WIDGET(button));
+ gtk_widget_show(GTK_WIDGET(button));
+
+ g_free(iter->data);
+ iter = iter->next;
+ }
+
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
+
+ g_slist_free(path);
+
+ path_bar->first_button = g_slist_last(path_bar->path_button);
+ }
+
+ gtk_widget_set_sensitive(GTK_WIDGET(path_bar->home_button), bar->store?TRUE:FALSE);
}
More information about the Xfce4-commits
mailing list