gnome-utils r8168 - in trunk/baobab: . src



Author: cosimoc
Date: Sun Oct 26 19:13:24 2008
New Revision: 8168
URL: http://svn.gnome.org/viewvc/gnome-utils?rev=8168&view=rev

Log:
2008-10-26  Cosimo Cecchi  <cosimoc gnome org>

        * src/Makefile.am:
        * src/baobab-mount-operation.c: Removed.
        * src/baobab-mount-operation.h: Removed.
        * src/baobab-remote-connect-dialog.c:
        (connect_server_dialog_present_uri):
        * src/baobab-utils.c:
        (baobab_help_display):
        * src/baobab.c:
        (main):
	Drop libgnome dependency (#557264).

Removed:
   trunk/baobab/src/baobab-mount-operation.c
   trunk/baobab/src/baobab-mount-operation.h
Modified:
   trunk/baobab/ChangeLog
   trunk/baobab/src/Makefile.am
   trunk/baobab/src/baobab-remote-connect-dialog.c
   trunk/baobab/src/baobab-utils.c
   trunk/baobab/src/baobab.c

Modified: trunk/baobab/src/Makefile.am
==============================================================================
--- trunk/baobab/src/Makefile.am	(original)
+++ trunk/baobab/src/Makefile.am	Sun Oct 26 19:13:24 2008
@@ -35,8 +35,6 @@
 	baobab-prefs.h \
 	baobab-remote-connect-dialog.c \
 	baobab-remote-connect-dialog.h \
-	baobab-mount-operation.c \
-	baobab-mount-operation.h \
 	gedit-spinner.c \
 	gedit-spinner.h \
 	baobab-chart.c \

Modified: trunk/baobab/src/baobab-remote-connect-dialog.c
==============================================================================
--- trunk/baobab/src/baobab-remote-connect-dialog.c	(original)
+++ trunk/baobab/src/baobab-remote-connect-dialog.c	Sun Oct 26 19:13:24 2008
@@ -28,7 +28,6 @@
 
 #include <config.h>
 #include "baobab-remote-connect-dialog.h"
-#include "baobab-mount-operation.h"
 
 #include <string.h>
 #include <glib/gi18n.h>
@@ -128,13 +127,14 @@
 {
 	GMountOperation *op;
 
-	op = baobab_mount_operation_new (GTK_WINDOW (widget));
+	op = gtk_mount_operation_new (GTK_WINDOW (widget));
 
 	g_file_mount_enclosing_volume (location,
 				       0, op,
 				       NULL,
 				       (GAsyncReadyCallback) mount_enclosing_ready_cb,
 				       app);
+	g_object_unref (op);
 }
 
 struct MethodInfo {

Modified: trunk/baobab/src/baobab-utils.c
==============================================================================
--- trunk/baobab/src/baobab-utils.c	(original)
+++ trunk/baobab/src/baobab-utils.c	Sun Oct 26 19:13:24 2008
@@ -33,7 +33,6 @@
 #include <gio/gio.h>
 #include <glibtop/mountlist.h>
 #include <glibtop/fsusage.h>
-#include <libgnome/gnome-help.h>
 
 #include "baobab.h"
 #include "baobab-treeview.h"
@@ -549,11 +548,15 @@
 		     const gchar *link_id)
 {
 	GError *error = NULL;
+	char *uri;
 	gboolean ret;
 
-	ret = gnome_help_display (file_name,
-				  link_id,
-				  &error);
+	uri = (link_id) ? 
+		g_strdup_printf ("ghelp:%s#%s", file_name, link_id) :
+		g_strdup_printf ("ghelp:%s", file_name);
+
+	ret = gtk_show_uri (gtk_window_get_screen (parent),
+			    uri, gtk_get_current_event_time (), &error);
 
 	if (error != NULL) {
 		GtkWidget *dialog;

Modified: trunk/baobab/src/baobab.c
==============================================================================
--- trunk/baobab/src/baobab.c	(original)
+++ trunk/baobab/src/baobab.c	Sun Oct 26 19:13:24 2008
@@ -25,8 +25,6 @@
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 #include <gio/gio.h>
-#include <libgnomeui/libgnomeui.h>
-#include <libgnomeui/gnome-ui-init.h>
 #include <gconf/gconf-client.h>
 #include <glibtop.h>
 
@@ -906,25 +904,31 @@
 int
 main (int argc, char *argv[])
 {
-	GnomeProgram *program;
 	GOptionContext *context;
+	GError *error = NULL;
 
 	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
 
 	context = g_option_context_new (NULL);
+	g_option_context_set_ignore_unknown_options (context, FALSE);
+	g_option_context_set_help_enabled (context, TRUE);
+	g_option_context_add_group (context, gtk_get_option_group (TRUE));
+
+	g_option_context_parse (context, &argc, &argv, &error);
+
+	if (error) {
+		g_critical ("Unable to parse option: %s", error->message);
+		g_error_free (error);
+		g_option_context_free (context);
 
-	program = gnome_program_init ("baobab", VERSION,
-				      LIBGNOMEUI_MODULE,
-				      argc, argv,
-				      GNOME_PARAM_GOPTION_CONTEXT, context,
-				      GNOME_PARAM_APP_DATADIR,
-				      BAOBAB_DATA_DIR, NULL);
+		exit (1);
+	}
+	g_option_context_free (context);
 
 	g_set_application_name ("Baobab");
 
-	gnome_authentication_manager_init ();
 	glibtop_init ();
 
 	gtk_window_set_default_icon_name ("baobab");
@@ -995,7 +999,5 @@
 
 	glibtop_close ();
 
-	g_object_unref (program);
-
 	return 0;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]