nautilus-open-terminal r193 - in trunk: . src
- From: pborelli svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus-open-terminal r193 - in trunk: . src
- Date: Wed, 28 May 2008 21:28:05 +0000 (UTC)
Author: pborelli
Date: Wed May 28 21:28:04 2008
New Revision: 193
URL: http://svn.gnome.org/viewvc/nautilus-open-terminal?rev=193&view=rev
Log:
configure.in: update required glib version to reflect reality since we are using gio
src/nautilus-open-terminal.c: use g_uri_parse_scheme instead of open coding it.
Modified:
trunk/configure.in
trunk/src/nautilus-open-terminal.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Wed May 28 21:28:04 2008
@@ -29,18 +29,17 @@
# Dependency checks
NAUTILUS_REQUIRED=2.21.2
-EEL_REQUIRED=2.6.0
LIBGNOME_DESKTOP_REQUIRED=2.9.91
-GLIB_REQUIRED=2.4.0
+GLIB_REQUIRED=2.16.0
-PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension >= $NAUTILUS_REQUIRED glib-2.0 >= $GLIB_REQUIRED)
+PKG_CHECK_MODULES(NAUTILUS, [
+ libnautilus-extension >= $NAUTILUS_REQUIRED
+ glib-2.0 >= $GLIB_REQUIRED
+ gio-2.0
+])
PKG_CHECK_MODULES(GCONF, gconf-2.0)
PKG_CHECK_MODULES(GNOMEDESKTOP, gnome-desktop-2.0 >= $LIBGNOME_DESKTOP_REQUIRED)
-PKG_CHECK_MODULES(GLIB_RECENT, glib-2.0 >= 2.13.3,
- AC_DEFINE(HAVE_GLIB_DESKTOP_DIR_API, 1, [g_get_user_special_dir() support]),
- AC_MSG_NOTICE([not using g_get_user_special_dir()]))
-
# Make dependency CFLAGS and LIBS available
Modified: trunk/src/nautilus-open-terminal.c
==============================================================================
--- trunk/src/nautilus-open-terminal.c (original)
+++ trunk/src/nautilus-open-terminal.c Wed May 28 21:28:04 2008
@@ -30,6 +30,7 @@
#include <libnautilus-extension/nautilus-menu-provider.h>
#include <glib/gi18n-lib.h>
+#include <gio/gio.h>
#include <gtk/gtkicontheme.h>
#include <gtk/gtkwidget.h>
#include <gtk/gtkmain.h>
@@ -63,26 +64,13 @@
FILE_INFO_OTHER
} TerminalFileInfo;
-static char *
-get_uri_scheme (const char *uri)
-{
- const char *p;
- char *scheme = NULL;
-
- if ((uri != NULL) && (p = strchr (uri, ':'))) {
- scheme = g_strndup (uri, p - uri);
- }
-
- return scheme;
-}
-
static TerminalFileInfo
get_terminal_file_info (const char *uri)
{
TerminalFileInfo ret;
char *uri_scheme;
- uri_scheme = get_uri_scheme (uri);
+ uri_scheme = g_uri_parse_scheme (uri);
if (uri_scheme == NULL) {
ret = FILE_INFO_OTHER;
@@ -166,12 +154,6 @@
NULL);
}
-#ifdef HAVE_GLIB_DESKTOP_DIR_API
- #define get_desktop_dir() g_strdup (g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP))
-#else
- #define get_desktop_dir() g_build_filename (g_get_home_dir (), "Desktop", NULL)
-#endif
-
static inline void
append_command_info (char **terminal_exec,
const char *command)
@@ -287,7 +269,7 @@
if (desktop_is_home_dir () || desktop_opens_home_dir ()) {
working_directory = g_strdup (g_get_home_dir ());
} else {
- working_directory = get_desktop_dir ();
+ working_directory = g_strdup (g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP));
}
if (command != NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]