[Xfce4-commits] <midori:master> Fix for Open all in tabs for directories in history bar
Christian Dywan
noreply at xfce.org
Sat Jul 3 22:36:05 CEST 2010
Updating branch refs/heads/master
to 9230c299e9aa7a658496b035ecd2b1c788f0d004 (commit)
from b170dd688a3d45fea4b74954328379e91a645ebe (commit)
commit 9230c299e9aa7a658496b035ecd2b1c788f0d004
Author: Alexander Butenko <a.butenka at gmail.com>
Date: Fri Jul 2 11:47:55 2010 -0400
Fix for Open all in tabs for directories in history bar
panels/midori-history.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/panels/midori-history.c b/panels/midori-history.c
index 809fb25..f8b0fe2 100644
--- a/panels/midori-history.c
+++ b/panels/midori-history.c
@@ -12,6 +12,7 @@
#include "midori-history.h"
#include "midori-app.h"
+#include "midori-array.h"
#include "midori-browser.h"
#include "midori-stock.h"
#include "midori-view.h"
@@ -667,12 +668,22 @@ midori_history_open_in_tab_activate_cb (GtkWidget* menuitem,
guint n;
item = (KatzeItem*)g_object_get_data (G_OBJECT (menuitem), "KatzeItem");
- if (KATZE_IS_ARRAY (item))
+ if (KATZE_ITEM_IS_FOLDER (item))
{
+ sqlite3* db;
+ gchar* sqlcmd;
KatzeItem* child;
+ KatzeArray* array;
guint i = 0;
- while ((child = katze_array_get_nth_item (KATZE_ARRAY (item), i)))
+ db = g_object_get_data (G_OBJECT (history->array), "db");
+ sqlcmd = g_strdup_printf ("SELECT uri, title, date, day "
+ "FROM history WHERE day = %d "
+ "GROUP BY uri ORDER BY date ASC",
+ (int)katze_item_get_added (item));
+ array = katze_array_from_sqlite (db, sqlcmd);
+ g_free (sqlcmd);
+ while ((child = katze_array_get_nth_item (KATZE_ARRAY (array), i++)))
{
if ((uri = katze_item_get_uri (child)) && *uri)
{
@@ -686,7 +697,6 @@ midori_history_open_in_tab_activate_cb (GtkWidget* menuitem,
midori_browser_set_current_page (browser, n);
g_object_unref (settings);
}
- i++;
}
}
else
More information about the Xfce4-commits
mailing list