marlin r1312 - in trunk: . marlin src
- From: iain svn gnome org
- To: svn-commits-list gnome org
- Subject: marlin r1312 - in trunk: . marlin src
- Date: Wed, 15 Oct 2008 01:13:16 +0000 (UTC)
Author: iain
Date: Wed Oct 15 01:13:16 2008
New Revision: 1312
URL: http://svn.gnome.org/viewvc/marlin?rev=1312&view=rev
Log:
Remove libgnome and libgnomeui dependencies
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/marlin/ChangeLog
trunk/marlin/marlin-x-utils.c
trunk/src/ChangeLog
trunk/src/main.c
trunk/src/marlin-window-menu.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Wed Oct 15 01:13:16 2008
@@ -76,7 +76,6 @@
PKG_CHECK_MODULES(MARLIN, glib-2.0 >= 2.10.0 gmodule-2.0 >= 2.10.0 \
gthread-2.0 >= 2.8.0 \
gio-2.0 >= 2.16.0 \
- libgnome-2.0 >= 2.6.0 \
gconf-2.0 \
gstreamer-$GST_MAJORMINOR >= $GSTREAMER_REQUIRED \
gstreamer-base-$GST_MAJORMINOR \
@@ -89,7 +88,7 @@
AC_SUBST(MARLIN_CFLAGS)
AC_SUBST(MARLIN_LIBS)
-PKG_CHECK_MODULES(MARLINX, gtk+-2.0 >= 2.14.0 libgnomeui-2.0 >= 2.6)
+PKG_CHECK_MODULES(MARLINX, gtk+-2.0 >= 2.14.0)
AC_SUBST(MARLINX_CFLAGS)
AC_SUBST(MARLINX_LIBS)
Modified: trunk/marlin/marlin-x-utils.c
==============================================================================
--- trunk/marlin/marlin-x-utils.c (original)
+++ trunk/marlin/marlin-x-utils.c Wed Oct 15 01:13:16 2008
@@ -32,8 +32,6 @@
#include <gtk/gtkalignment.h>
#include <gtk/gtkcombobox.h>
-#include <libgnome/gnome-help.h>
-
#include <marlin/marlin-utils.h>
#include <marlin/marlin-x-utils.h>
#include <marlin/marlin-marker-model.h>
@@ -72,7 +70,7 @@
{
GError *error = NULL;
- gnome_help_display ("marlin", section, &error);
+ gtk_show_uri (NULL, section, GDK_CURRENT_TIME, &error);
if (error) {
GtkWidget *msgbox;
Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c (original)
+++ trunk/src/main.c Wed Oct 15 01:13:16 2008
@@ -2,7 +2,7 @@
/*
* Authors: Iain Holmes <iain prettypeople org>
*
- * Copyright 2002 - 2005 Iain Holmes
+ * Copyright 2002 - 2008 Iain Holmes
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public
@@ -28,8 +28,8 @@
#include <signal.h>
#include <execinfo.h>
+#include <glib/gi18n.h>
#include <gio/gio.h>
-#include <gnome.h>
#include <gconf/gconf-client.h>
@@ -228,7 +228,7 @@
}
GtkWidget *
-marlin_open_window (const char *filename,
+marlin_open_window (const char *uri,
const char *uuid,
GdkScreen *screen,
const char *startup_id)
@@ -261,7 +261,7 @@
"channels", channels,
NULL);
- if (filename == NULL) {
+ if (uri == NULL) {
char *name = make_window_name ();
g_object_set (G_OBJECT (sample),
@@ -288,19 +288,18 @@
g_signal_connect (G_OBJECT (window), "destroy",
G_CALLBACK (window_destroyed), NULL);
- if (filename != NULL) {
+ if (uri != NULL) {
GtkRecentManager *manager;
GtkRecentData data;
gboolean uncertain;
- char *uri;
- marlin_window_load_file (window, filename);
+ marlin_window_load_file (window, uri);
manager = gtk_recent_manager_get_default ();
data.display_name = NULL;
data.description = NULL;
- data.mime_type = (char *) g_content_type_guess (filename,
+ data.mime_type = (char *) g_content_type_guess (uri + 7,
NULL, 0,
&uncertain);
data.app_name = "Marlin";
@@ -309,15 +308,8 @@
data.groups = NULL;
data.is_private = FALSE;
- if (strstr (filename, "://")) {
- uri = g_strdup (filename);
- } else {
- uri = g_strdup_printf ("file://%s", filename);
- }
gtk_recent_manager_add_full (manager, uri, &data);
-
g_free (data.mime_type);
- g_free (uri);
}
marlin_windows = g_list_prepend (marlin_windows, window);
@@ -329,11 +321,10 @@
if (screen) {
gtk_window_set_screen (GTK_WINDOW (window), screen);
}
-#if GTK_CHECK_VERSION (2, 12, 0)
+
if (startup_id) {
gtk_window_set_startup_id (GTK_WINDOW (window), startup_id);
}
-#endif
return (GtkWidget *) window;
}
@@ -383,7 +374,7 @@
}
static char *
-make_full_path (const char *path)
+make_full_uri (const char *path)
{
char *retval, *curdir, *escaped;
@@ -396,7 +387,7 @@
if (path[0] == '/') {
escaped = g_uri_escape_string (path, NULL, TRUE);
- retval = g_strdup_printf ("%s", path);
+ retval = g_strdup_printf ("file://%s", path);
g_free (escaped);
return retval;
}
@@ -410,7 +401,7 @@
}
static void
-process_command_line (GnomeProgram *program)
+process_command_line (void)
{
if (files == NULL) {
marlin_open_window (NULL, NULL, NULL, NULL);
@@ -418,11 +409,11 @@
int i;
/* Open a new window for each file */
for (i = 0; files[i]; i++) {
- char *fullpath;
+ char *uri;
- fullpath = make_full_path (files[i]);
- marlin_open_window (fullpath, NULL, NULL, NULL);
- g_free (fullpath);
+ uri = make_full_uri (files[i]);
+ marlin_open_window (uri, NULL, NULL, NULL);
+ g_free (uri);
}
}
}
@@ -503,8 +494,8 @@
char **argv)
{
GOptionContext *option_ctxt;
- GnomeProgram *program;
MarlinProgram *marlin_program;
+ GError *error = NULL;
#ifdef HAVE_MEDIA_PROFILES
GConfClient *client;
#endif
@@ -522,20 +513,19 @@
/* Initialise GThread at the very start */
g_thread_init (NULL);
- option_ctxt = g_option_context_new ("- Marlin");
+ option_ctxt = g_option_context_new (_("- Marlin"));
g_option_context_add_main_entries (option_ctxt, marlin_options,
GETTEXT_PACKAGE);
g_option_context_add_group (option_ctxt, gst_init_get_option_group ());
+ g_option_context_add_group (option_ctxt, gtk_get_option_group (FALSE));
g_option_context_set_ignore_unknown_options (option_ctxt, TRUE);
- program = gnome_program_init ("marlin", VERSION,
- LIBGNOMEUI_MODULE,
- argc, argv,
- GNOME_PARAM_GOPTION_CONTEXT, option_ctxt,
- GNOME_PARAM_HUMAN_READABLE_NAME,
- _("Marlin Sample Editor"),
- GNOME_PARAM_APP_DATADIR, DATADIR,
- NULL);
+ g_option_context_parse (option_ctxt, &argc, &argv, &error);
+ if (error != NULL) {
+ g_error ("Error parsing options: %s", error->message);
+ }
+
+ gtk_init (&argc, &argv);
g_set_application_name (_("Marlin Sample Editor"));
@@ -587,7 +577,7 @@
message = unique_message_data_new ();
- path = make_full_path (files[i]);
+ path = make_full_uri (files[i]);
unique_message_data_set_text (message, path, strlen (path));
unique_app_send_message (unique_app,
@@ -623,10 +613,10 @@
if (marlin_session_is_restored ()) {
marlin_session_load ();
} else {
- process_command_line (program);
+ process_command_line ();
}
#else
- process_command_line (program);
+ process_command_line ();
#endif
/* After the command line has been processed,
Modified: trunk/src/marlin-window-menu.c
==============================================================================
--- trunk/src/marlin-window-menu.c (original)
+++ trunk/src/marlin-window-menu.c Wed Oct 15 01:13:16 2008
@@ -44,8 +44,6 @@
#include <gtk/gtkactiongroup.h>
#include <gtk/gtkaboutdialog.h>
-#include <libgnome/gnome-help.h>
-
#include <marlin/marlin-file-utils.h>
#include <marlin/marlin-utils.h>
#include <marlin/marlin-stock.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]