[Xfce4-commits] r23422 - xarchiver/branches/xarchiver-psybsd/src
Stephan Arts
stephan at xfce.org
Sun Oct 15 21:40:51 UTC 2006
Author: stephan
Date: 2006-10-15 21:40:49 +0000 (Sun, 15 Oct 2006)
New Revision: 23422
Modified:
xarchiver/branches/xarchiver-psybsd/src/Makefile.am
xarchiver/branches/xarchiver-psybsd/src/archive_store.c
xarchiver/branches/xarchiver-psybsd/src/main.c
xarchiver/branches/xarchiver-psybsd/src/main_window.c
xarchiver/branches/xarchiver-psybsd/src/tool_bar.c
Log:
Applied patch from Peter de Ridder <pc.ridder at zonnet.nl> with changes.
- Added path_bar navigation
Modified: xarchiver/branches/xarchiver-psybsd/src/Makefile.am
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/Makefile.am 2006-10-15 20:14:35 UTC (rev 23421)
+++ xarchiver/branches/xarchiver-psybsd/src/Makefile.am 2006-10-15 21:40:49 UTC (rev 23422)
@@ -5,6 +5,7 @@
main_window.c main_window.h \
navigation_bar.c navigation_bar.h \
tool_bar.c tool_bar.h \
+ path_bar.c path_bar.h \
settings.c settings.h \
archive_store.c archive_store.h \
preferences_dialog.c preferences_dialog.h \
Modified: xarchiver/branches/xarchiver-psybsd/src/archive_store.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/archive_store.c 2006-10-15 20:14:35 UTC (rev 23421)
+++ xarchiver/branches/xarchiver-psybsd/src/archive_store.c 2006-10-15 21:40:49 UTC (rev 23422)
@@ -1033,7 +1033,10 @@
/* TODO Signal file-activated */
if(strcmp(entry->mime_type, "inode/directory"))
+ {
+ g_debug("file clicked");
return;
+ }
store->current_entry = g_slist_prepend(store->current_entry, entry);
}
@@ -1202,8 +1205,16 @@
{
g_return_val_if_fail(store, NULL);
- /* made a copy, don't want someone play with the internals */
- return g_slist_copy(store->current_entry);
+ GSList *iter = store->current_entry;
+ GSList *path = NULL;
+
+ while(iter)
+ {
+ path = g_slist_prepend(path, g_strdup(((LXAEntry*)iter->data)->filename));
+ iter = iter->next;
+ }
+
+ return path;
}
gchar *
@@ -1234,7 +1245,7 @@
if(!store->archive)
return FALSE;
- gchar **buf = g_strsplit_set(path, "/\n", -1);
+ gchar **buf = g_strsplit_set(path, "/\\\n", -1);
gchar **iter = buf;
LXAEntry *entry = store->archive->root_entry;
GSList *stack = g_slist_prepend(NULL, entry);
Modified: xarchiver/branches/xarchiver-psybsd/src/main.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/main.c 2006-10-15 20:14:35 UTC (rev 23421)
+++ xarchiver/branches/xarchiver-psybsd/src/main.c 2006-10-15 21:40:49 UTC (rev 23422)
@@ -247,7 +247,7 @@
if(!xa_main_window_open_archive(XA_MAIN_WINDOW(main_window), argv[i]))
{
opened_archives++;
- gtk_widget_set_size_request(main_window, 500, 350);
+ gtk_widget_set_size_request(main_window, 300, 300);
gtk_widget_show_all(main_window);
} else
{
Modified: xarchiver/branches/xarchiver-psybsd/src/main_window.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/main_window.c 2006-10-15 20:14:35 UTC (rev 23421)
+++ xarchiver/branches/xarchiver-psybsd/src/main_window.c 2006-10-15 21:40:49 UTC (rev 23422)
@@ -31,6 +31,7 @@
#include "archive_store.h"
#include "navigation_bar.h"
#include "tool_bar.h"
+#include "path_bar.h"
#include "main_window.h"
#include "new_dialog.h"
#include "extract_dialog.h"
@@ -254,7 +255,9 @@
g_signal_connect(G_OBJECT(window->toolbar.tool_item_stop), "clicked", G_CALLBACK(cb_xa_main_stop_archive), window);
- window->navigationbar = xa_tool_bar_new(NULL);
+ //window->navigationbar = xa_tool_bar_new(NULL);
+ window->navigationbar = xa_path_bar_new(NULL);
+ gtk_container_set_border_width(GTK_CONTAINER(window->navigationbar), 3);
/* main view */
window->scrollwindow = gtk_scrolled_window_new(NULL, NULL);
Modified: xarchiver/branches/xarchiver-psybsd/src/tool_bar.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/tool_bar.c 2006-10-15 20:14:35 UTC (rev 23421)
+++ xarchiver/branches/xarchiver-psybsd/src/tool_bar.c 2006-10-15 21:40:49 UTC (rev 23422)
@@ -218,6 +218,8 @@
if(tool_bar->bar && GTK_WIDGET_VISIBLE(tool_bar->bar))
gtk_widget_size_request(GTK_WIDGET(tool_bar->bar), requisition);
+
+ widget->requisition = *requisition;
}
static void
@@ -225,6 +227,8 @@
{
XAToolBar *tool_bar = XA_TOOL_BAR(widget);
+ widget->allocation = *allocation;
+
if(tool_bar->bar && GTK_WIDGET_VISIBLE(tool_bar->bar))
gtk_widget_size_allocate(GTK_WIDGET(tool_bar->bar), allocation);
}
More information about the Xfce4-commits
mailing list