[gnome-launch-box] dropped libgnomeui from the bookmarks module
- From: Sven Herzberg <herzi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-launch-box] dropped libgnomeui from the bookmarks module
- Date: Thu, 11 Feb 2010 13:35:26 +0000 (UTC)
commit 551a77302af664732d9804874a945eadcd811d61
Author: Sven Herzberg <herzi gnome-de org>
Date: Tue Feb 9 14:26:35 2010 +0100
dropped libgnomeui from the bookmarks module
* src/lb-bookmark-list.c: replaced gnome_thumbnail_md5() with GChecksum
* src/lb-module-bookmarks.c: replaced gnome_url_show() with
gtk_show_uri()
src/lb-bookmark-list.c | 39 +++++++++++++++++++++------------------
src/lb-module-bookmarks.c | 6 +++---
2 files changed, 24 insertions(+), 21 deletions(-)
---
diff --git a/src/lb-bookmark-list.c b/src/lb-bookmark-list.c
index 89b473e..7b26662 100644
--- a/src/lb-bookmark-list.c
+++ b/src/lb-bookmark-list.c
@@ -39,7 +39,6 @@
#include <fcntl.h>
#include <gtk/gtk.h>
-#include <libgnomeui/libgnomeui.h>
#include <libxml/parser.h>
#include <libxml/HTMLparser.h>
@@ -278,23 +277,27 @@ enum
static void
lb_bookmark_icon_to_local_file (LbBookmark *bookmark)
{
- char *md5;
-
- if (bookmark->icon_path == NULL)
- return;
-
- md5 = gnome_thumbnail_md5 (bookmark->icon_path);
- bookmark->icon_path = g_build_filename (g_get_home_dir (),
- ".gnome2", "epiphany",
- "favicon_cache", md5,
- NULL);
-
- if (!g_file_test (bookmark->icon_path, G_FILE_TEST_EXISTS)) {
- g_free (bookmark->icon_path);
- bookmark->icon_path = NULL;
- }
-
- return;
+ gchar const* md5;
+ GChecksum * checksum;
+
+ if (bookmark->icon_path == NULL)
+ return;
+
+ checksum = g_checksum_new (G_CHECKSUM_MD5);
+ g_checksum_update (checksum, bookmark->icon_path, -1);
+ md5 = g_checksum_get_string (checksum);
+ g_checksum_free (checksum);
+
+ bookmark->icon_path = g_build_filename (g_get_home_dir (),
+ ".gnome2", "epiphany",
+ "favicon_cache", md5,
+ NULL);
+
+ if (!g_file_test (bookmark->icon_path, G_FILE_TEST_EXISTS))
+ {
+ g_free (bookmark->icon_path);
+ bookmark->icon_path = NULL;
+ }
}
static void
diff --git a/src/lb-module-bookmarks.c b/src/lb-module-bookmarks.c
index 84bc109..a9aa9bc 100644
--- a/src/lb-module-bookmarks.c
+++ b/src/lb-module-bookmarks.c
@@ -26,8 +26,7 @@
#include <string.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <libgnome/libgnome.h>
+#include <gtk/gtk.h>
#include "lb-action.h"
#include "lb-bookmark-list.h"
@@ -265,7 +264,8 @@ lb_module_bookmarks_activate (LbAction *action,
uri = (const gchar *) lb_action_get_data (action);
- if (! gnome_url_show (uri, &error)) {
+ /* FIXME: add the GdkScreen */
+ if (! gtk_show_uri (NULL, uri, GDK_CURRENT_TIME, &error)) {
g_print ("Failed to launch: '%s'\n", error->message);
g_error_free (error);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]