Commit 668320fe authored by Uwe Scholz's avatar Uwe Scholz

Remove last remnants of libgnomeui, finally fixing #34

Where necessary, replace GnomeApp functions by gtk functions
parent ae80de89
......@@ -68,7 +68,7 @@ Plugins:
3. Building
--------------------------------
GNOME Commander requires glib >= @GLIB_REQ@, GTK+ >= @GTK_REQ@, gnome >= @GNOMEUI_REQ@
GNOME Commander requires glib >= @GLIB_REQ@, GTK+ >= @GTK_REQ@
and gnome-keyring >= @GNOME_KEYRING_REQ@ libraries.
Additionally GNOME Commander may require:
......
......@@ -37,7 +37,6 @@ dnl ===================
GLIB_REQ=2.44.0
GMODULE_REQ=2.0.0
GTK_REQ=2.24.0
GNOMEUI_REQ=2.4.0
GNOMEVFS_REQ=2.0.0
GNOME_KEYRING_REQ=2.22
UNIQUE_REQ=0.9.3
......@@ -49,7 +48,6 @@ POPPLER_REQ=0.18
AC_SUBST(GLIB_REQ)
AC_SUBST(GTK_REQ)
AC_SUBST(GNOMEUI_REQ)
AC_SUBST(GNOMEVFS_REQ)
AC_SUBST(GNOME_KEYRING_REQ)
AC_SUBST(UNIQUE_REQ)
......@@ -76,9 +74,6 @@ PKG_CHECK_MODULES([GMODULE], [gmodule-2.0 >= ${GMODULE_REQ}])
dnl Check for gtk+
PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= ${GTK_REQ}])
dnl Check for libgnomeui
PKG_CHECK_MODULES([GNOMEUI], [libgnomeui-2.0 >= ${GNOMEUI_REQ}])
dnl Check for gnome-vfs
PKG_CHECK_MODULES([GNOMEVFS], [gnome-vfs-2.0 >= ${GNOMEVFS_REQ}], have_gnomevfs=yes, have_gnomevfs=no)
......@@ -231,11 +226,6 @@ dnl Set PIXMAPS_DIR in config.h.
AC_DEFINE_UNQUOTED(PIXMAPS_DIR, "${PREFIX}/share/pixmaps/${PACKAGE}", [pixmaps location])
dnl Set GNOME_PREFIX in config.h.
GNOME_PREFIX_TMP=`pkg-config --variable=prefix libgnome-2.0`
AC_DEFINE_UNQUOTED(GNOME_PREFIX, "$GNOME_PREFIX_TMP", "")
PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
......
......@@ -22,7 +22,6 @@ RDEPEND="
unique? ( >=dev-libs/libunique-@UNIQUE_REQ@:1 )
gnome-base/gnome-keyring
>=gnome-base/gnome-vfs-@GNOMEVFS_REQ@
>=gnome-base/libgnomeui-@GNOMEUI_REQ@
>=x11-libs/gtk+-@GTK_REQ@:2
chm? ( dev-libs/chmlib )
exif? ( >=media-gfx/exiv2-@EXIV2_REQ@ )
......
......@@ -42,7 +42,6 @@ BuildRequires: gettext >= 0.19.7
BuildRequires: glib2-devel >= @GLIB_REQ@
BuildRequires: gtk2-devel >= @GTK_REQ@
BuildRequires: gnome-vfs2-devel >= @GNOMEVFS_REQ@
BuildRequires: libgnomeui-devel >= @GNOMEUI_REQ@
BuildRequires: gnome-keyring-devel >= @GNOME_KEYRING_REQ@
BuildRequires: yelp-tools
BuildRequires: perl(XML::Parser)
......@@ -51,7 +50,6 @@ Requires: glib2 >= @GLIB_REQ@
Requires: gtk2 >= @GTK_REQ@
Requires: gnome-vfs2 >= @GNOMEVFS_REQ@
Requires: gnome-vfs2-smb >= @GNOMEVFS_REQ@
Requires: libgnomeui >= @GNOMEUI_REQ@
Requires: gnome-keyring >= @GNOME_KEYRING_REQ@
# For CentOS:
Requires: gnome-icon-theme-legacy >= 3.0
......
......@@ -4,7 +4,7 @@ AM_CXXFLAGS = $(WARN_CXXFLAGS) -Werror=parentheses -Wno-parentheses -Werror=cast
AM_LDFLAGS = $(WARN_LDFLAGS)
AM_CPPFLAGS = \
$(GNOMEUI_CFLAGS) \
$(GTK_CFLAGS) \
$(GNOMEVFS_CFLAGS) \
-DGTK_DISABLE_SINGLE_INCLUDES \
-DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES
......@@ -23,7 +23,7 @@ libgcmd_la_SOURCES = \
libgcmd-deps.h \
libgcmd.h
libgcmd_la_LIBADD = $(GNOMEUI_LIBS) $(GNOMEVFS_LIBS)
libgcmd_la_LDFLAGS = $(GNOMEUI_LIBS) $(GNOMEVFS_LIBS)
libgcmd_la_LIBADD = $(GTK_LIBS) $(GNOMEVFS_LIBS)
libgcmd_la_LDFLAGS = $(GTK_LIBS) $(GNOMEVFS_LIBS)
-include $(top_srcdir)/git.mk
......@@ -27,7 +27,6 @@
#include <gdk/gdkkeysyms.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gtk/gtk.h>
#include <libgnomeui/gnome-app-helper.h>
#include <libgnomevfs/gnome-vfs.h>
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
......
......@@ -5,7 +5,7 @@ AM_LDFLAGS = $(WARN_LDFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(GNOMEUI_CFLAGS) \
$(GTK_CFLAGS) \
$(GNOMEVFS_CFLAGS) \
-DGTK_DISABLE_SINGLE_INCLUDES \
-DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES
......@@ -18,6 +18,6 @@ libfileroller_la_SOURCES = \
file-roller-plugin.h file-roller-plugin.cc \
file-roller.xpm file-roller-small.xpm
libfileroller_la_LDFLAGS = $(GNOMEUI_LIBS) $(GNOMEVFS_LIBS) -module -avoid-version
libfileroller_la_LDFLAGS = $(GTK_LIBS) $(GNOMEVFS_LIBS) -module -avoid-version
-include $(top_srcdir)/git.mk
......@@ -5,7 +5,7 @@ AM_LDFLAGS = $(WARN_LDFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(GNOMEUI_CFLAGS) \
$(GTK_CFLAGS) \
$(GNOMEVFS_CFLAGS) \
-DGTK_DISABLE_SINGLE_INCLUDES \
-DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES
......@@ -19,6 +19,6 @@ libtest_la_SOURCES = \
test-plugin.h test-plugin.cc \
test-plugin.xpm
libtest_la_LDFLAGS = $(GNOMEUI_LIBS) $(GNOMEVFS_LIBS) -module -avoid-version
libtest_la_LDFLAGS = $(GTK_LIBS) $(GNOMEVFS_LIBS) -module -avoid-version
-include $(top_srcdir)/git.mk
......@@ -9,7 +9,7 @@ AM_LDFLAGS = $(WARN_LDFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(GNOMEUI_CFLAGS) \
$(GTK_CFLAGS) \
$(GNOMEVFS_CFLAGS) \
$(GNOME_KEYRING_CFLAGS) \
$(UNIQUE_CFLAGS) \
......@@ -97,7 +97,7 @@ gnome_commander_LDADD = \
dialogs/libgcmd-dialogs.a \
tags/libgcmd-tags.a \
intviewer/libgviewer.a \
$(GNOMEUI_LIBS) \
$(GTK_LIBS) \
$(GNOMEVFS_LIBS) \
$(GNOME_KEYRING_LIBS) \
$(UNIQUE_LIBS) \
......
......@@ -9,7 +9,7 @@ AM_LDFLAGS = $(WARN_LDFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(srcdir)/.. \
$(GNOMEUI_CFLAGS) \
$(GTK_CFLAGS) \
$(GNOMEVFS_CFLAGS) \
$(EXIV2_CFLAGS) \
$(TAGLIB_CFLAGS) \
......
......@@ -72,7 +72,7 @@ enum
struct GnomeCmdMainWinClass
{
GnomeAppClass parent_class;
GtkWindowClass parent_class;
void (* switch_fs) (GnomeCmdMainWin *mw, GnomeCmdFileSelector *fs);
};
......@@ -119,7 +119,7 @@ struct GnomeCmdMainWin::Private
guint key_snooper_id;
};
static GnomeAppClass *parent_class = NULL;
static GtkWindowClass *parent_class = nullptr;
static guint signals[LAST_SIGNAL] = { 0 };
......@@ -813,7 +813,7 @@ static void class_init (GnomeCmdMainWinClass *klass)
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
parent_class = (GnomeAppClass *) gtk_type_class (gnome_app_get_type ());
parent_class = (GtkWindowClass *) gtk_type_class (gtk_window_get_type ());
signals[SWITCH_FS] =
g_signal_new ("switch-fs",
......@@ -853,8 +853,11 @@ static void init (GnomeCmdMainWin *mw)
mw->priv->file_selector[LEFT] = NULL;
mw->priv->file_selector[RIGHT] = NULL;
gnome_app_construct (GNOME_APP (mw), "gnome-commander", gcmd_owner.is_root() ? _("GNOME Commander — ROOT PRIVILEGES") :
_("GNOME Commander"));
gtk_window_set_title (GTK_WINDOW (mw),
gcmd_owner.is_root()
? _("GNOME Commander — ROOT PRIVILEGES")
: _("GNOME Commander"));
g_object_set_data (*mw, "main_win", mw);
restore_size_and_pos (mw);
gtk_window_set_policy (*mw, TRUE, TRUE, FALSE);
......@@ -878,7 +881,8 @@ static void init (GnomeCmdMainWin *mw)
gtk_box_pack_start (GTK_BOX (mw->priv->vbox), mw->priv->menubar_new, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (mw->priv->vbox), create_separator (FALSE), FALSE, TRUE, 0);
gnome_app_set_contents (GNOME_APP (mw), mw->priv->vbox);
gtk_widget_show (mw->priv->vbox);
gtk_container_add (GTK_CONTAINER (mw), mw->priv->vbox);
mw->priv->paned = gnome_cmd_data.horizontal_orientation ? gtk_vpaned_new () : gtk_hpaned_new ();
......@@ -951,7 +955,7 @@ GtkType gnome_cmd_main_win_get_type ()
(GtkClassInitFunc) NULL
};
mw_type = gtk_type_unique (gnome_app_get_type (), &mw_info);
mw_type = gtk_type_unique (gtk_window_get_type (), &mw_info);
}
return mw_type;
......
/**
/**
* @file gnome-cmd-main-win.h
* @copyright (C) 2001-2006 Marcus Bjurman\n
* @copyright (C) 2007-2012 Piotr Eljasiak\n
......@@ -40,7 +40,7 @@ GtkType gnome_cmd_main_win_get_type ();
struct GnomeCmdMainWin
{
GnomeApp parent;
GtkWindow parent;
public: // FIXME: change to private
......
......@@ -9,7 +9,6 @@ AM_CPPFLAGS = \
-I$(srcdir)/.. \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(GNOMEUI_CFLAGS) \
$(GNOMEVFS_CFLAGS) \
-DGTK_DISABLE_SINGLE_INCLUDES \
-DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES
......
/**
/**
* @file main.cc
* @copyright (C) 2001-2006 Marcus Bjurman\n
* @copyright (C) 2007-2012 Piotr Eljasiak\n
......@@ -25,7 +25,6 @@
#ifdef HAVE_UNIQUE
#include <unique/unique.h>
#endif
#include <libgnomeui/gnome-ui-init.h>
#include "gnome-cmd-includes.h"
#include "gnome-cmd-main-win.h"
......@@ -56,13 +55,13 @@ extern int created_dirs_cnt;
extern int deleted_dirs_cnt;
static const GOptionEntry options [] =
static GOptionEntry options [] =
{
{"debug", 'd', 0, G_OPTION_ARG_STRING, &debug_flags, N_("Specify debug flags to use"), NULL},
{"start-left-dir", 'l', 0, G_OPTION_ARG_STRING, &start_dir_left, N_("Specify the start directory for the left pane"), NULL},
{"start-right-dir", 'r', 0, G_OPTION_ARG_STRING, &start_dir_right, N_("Specify the start directory for the right pane"), NULL},
{"config-dir", 0, 0, G_OPTION_ARG_STRING, &config_dir, N_("Specify the directory for configuration files"), NULL},
{NULL}
{"debug", 'd', 0, G_OPTION_ARG_STRING, &debug_flags, N_("Specify debug flags to use"), nullptr},
{"start-left-dir", 'l', 0, G_OPTION_ARG_STRING, &start_dir_left, N_("Specify the start directory for the left pane"), nullptr},
{"start-right-dir", 'r', 0, G_OPTION_ARG_STRING, &start_dir_right, N_("Specify the start directory for the right pane"), nullptr},
{"config-dir", 0, 0, G_OPTION_ARG_STRING, &config_dir, N_("Specify the directory for configuration files"), nullptr},
{nullptr}
};
......@@ -95,13 +94,13 @@ static UniqueResponse on_message_received (UniqueApp *app, UniqueCommand cmd, Un
int main (int argc, char *argv[])
{
GnomeProgram *program;
GError *error = nullptr;
GOptionContext *option_context;
#ifdef HAVE_UNIQUE
UniqueApp *app;
#endif
main_win = NULL;
main_win = nullptr;
if (!g_thread_supported ())
{
......@@ -116,14 +115,15 @@ int main (int argc, char *argv[])
gnome_cmd_mime_config();
option_context = g_option_context_new (PACKAGE);
g_option_context_add_main_entries (option_context, options, NULL);
program = gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE,
argc, argv,
GNOME_PARAM_GOPTION_CONTEXT, option_context,
GNOME_PARAM_HUMAN_READABLE_NAME, _("File Manager"),
GNOME_PARAM_APP_DATADIR, DATADIR,
GNOME_PARAM_NONE);
if (!gtk_init_with_args (&argc, &argv,
_("File Manager"),
options,
PACKAGE,
&error))
{
g_printerr ("%s\n", error->message);
return 1;
}
if (debug_flags && strchr(debug_flags,'a'))
debug_flags = g_strdup("cdfgiklmnpstuvwyzx");
......@@ -134,7 +134,7 @@ int main (int argc, char *argv[])
// ToDo: Remove somewhen after 1.10 release:
///////////////////////////////////
auto userConfigDirOld = g_build_filename (g_get_home_dir (), "." PACKAGE, NULL);
auto userConfigDirOld = g_build_filename (g_get_home_dir (), "." PACKAGE, nullptr);
if (is_dir_existing(userConfigDirOld) == 1)
{
......@@ -154,12 +154,12 @@ int main (int argc, char *argv[])
gnome_cmd_data.load();
#ifdef HAVE_UNIQUE
app = unique_app_new ("org.gnome.GnomeCommander", NULL);
app = unique_app_new ("org.gnome.GnomeCommander", nullptr);
#endif
#ifdef HAVE_UNIQUE
if (!gnome_cmd_data.options.allow_multiple_instances && unique_app_is_running (app))
unique_app_send_message (app, UNIQUE_ACTIVATE, NULL);
unique_app_send_message (app, UNIQUE_ACTIVATE, nullptr);
else
{
#endif
......@@ -182,7 +182,7 @@ int main (int argc, char *argv[])
main_win_widget = *main_win;
#ifdef HAVE_UNIQUE
unique_app_watch_window (app, *main_win);
g_signal_connect (app, "message-received", G_CALLBACK (on_message_received), NULL);
g_signal_connect (app, "message-received", G_CALLBACK (on_message_received), nullptr);
#endif
gtk_widget_show (*main_win);
......@@ -209,7 +209,6 @@ int main (int argc, char *argv[])
#ifdef HAVE_UNIQUE
g_object_unref (app);
#endif
g_object_unref (program);
g_free (debug_flags);
DEBUG ('c', "dirs total: %d remaining: %d\n", created_dirs_cnt, created_dirs_cnt - deleted_dirs_cnt);
......
......@@ -9,7 +9,7 @@ AM_LDFLAGS = $(WARN_LDFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(srcdir)/.. \
$(GNOMEUI_CFLAGS) \
$(GTK_CFLAGS) \
$(GNOMEVFS_CFLAGS) \
$(EXIV2_CFLAGS) \
$(TAGLIB_CFLAGS) \
......
......@@ -7,7 +7,6 @@ AM_CPPFLAGS = \
$(GLIB_CFLAGS) \
$(GOBJECT_CFLAGS) \
$(GTK_CFLAGS) \
$(GNOMEUI_CFLAGS) \
$(GTEST_CPPFLAGS) \
-I$(top_builddir)/src \
-I$(top_srcdir) \
......@@ -21,21 +20,18 @@ INTVLIBS = \
$(GLIB_LIBS) \
$(GOBJECT_CFLAGS) \
$(GTK_LIBS) \
$(GNOMEUI_LIBS) \
-lgtest
GCMD_LIBS = \
$(GLIB_LIBS) \
$(GOBJECT_CFLAGS) \
$(GTK_LIBS) \
$(GNOMEUI_LIBS) \
-lgtest
ADDITIONAL_LDADD = \
$(top_builddir)/src/intviewer/libgviewer.a \
$(GOBJECT_LIBS) \
$(GTK_LIBS) \
$(GNOMEUI_LIBS)
$(GTK_LIBS)
IV_TESTS = \
iv_viewerwidget \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment