Commit 2d684971 authored by Pierre Wieser's avatar Pierre Wieser

Now compile, start and stop

parent 4a4d0f3e
2015-05-20 Pierre Wieser <pwieser@trychlos.org>
Lot of changes to make NACT compile with Gtk3, removing deprecated
items:
* NactApplication now directly derives from GtkApplication.
* NactMainWindow now directly derives from GtkApplicationWindow.
* NactStatusbar is now a class.
* NactSortButtons is now a class.
* NactMenubar class is replaced with NactMenu helper functions.
* NactTreeView now derives from GtkBin.
* Most of signals are moved from NactMainWindow to NactTreeView.
2015-02-25 Pierre Wieser <pwieser@trychlos.org> 2015-02-25 Pierre Wieser <pwieser@trychlos.org>
* maintainer/run-autogen.sh: defaults to enable nautilus. * maintainer/run-autogen.sh: defaults to enable nautilus.
......
...@@ -1259,7 +1259,7 @@ ...@@ -1259,7 +1259,7 @@
New function. New function.
* src/nact/base-window.c: * src/nact/base-window.c:
* src/nact/base-window.h (base_window_get_parent): New function. * src/nact/base-window.h (base_window_get_main_window): New function.
* src/nact/nact-assistant-export.c * src/nact/nact-assistant-export.c
(instance_dispose): Clear the tree model. (instance_dispose): Clear the tree model.
......
...@@ -1386,7 +1386,7 @@ ...@@ -1386,7 +1386,7 @@
* src/nact/nact-main-window.c: * src/nact/nact-main-window.c:
* src/nact/nact-main-window.h: Remove MAIN_WINDOW_SIGNAL_UPDATE_ACTION_SENSITIVITIES * src/nact/nact-main-window.h: Remove MAIN_WINDOW_SIGNAL_UPDATE_ACTION_SENSITIVITIES
which is replaced by NactMenubar internal MENUBAR_SIGNAL_UPDATE_SENSITIVITIES one. which is replaced by NactMenubar internal MAIN_SIGNAL_UPDATE_SENSITIVITIES one.
Termination of the main window is managed in NactMainWindow. Termination of the main window is managed in NactMainWindow.
......
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
* src/nact/nact-tree-view.c (class_init, on_selection_changed): * src/nact/nact-tree-view.c (class_init, on_selection_changed):
* src/nact/nact-tree-view.h: * src/nact/nact-tree-view.h:
Get rid of TREE_SIGNAL_SELECTION_CHANGED signal, only using Get rid of TREE_SIGNAL_SELECTION_CHANGED signal, only using
MAIN_SIGNAL_SELECTION_CHANGED one, based on the assertion that the TREE_SIGNAL_SELECTION_CHANGED one, based on the assertion that the
NactMainWindow will be the first triggered handler. NactMainWindow will be the first triggered handler.
* src/nact/nact-tree-view.c (get_selected_items): Improve debug message. * src/nact/nact-tree-view.c (get_selected_items): Improve debug message.
...@@ -326,7 +326,7 @@ ...@@ -326,7 +326,7 @@
2012-02-01 Pierre Wieser <pwieser@trychlos.org> 2012-02-01 Pierre Wieser <pwieser@trychlos.org>
* src/nact/nact-main-window.c: * src/nact/nact-main-window.c:
* src/nact/nact-main-window.h: New MAIN_SIGNAL_CONTEXT_MENU signal. * src/nact/nact-main-window.h: New TREE_SIGNAL_CONTEXT_MENU signal.
* src/nact/nact-marshal.def: New closure definition. * src/nact/nact-marshal.def: New closure definition.
......
...@@ -28,13 +28,14 @@ ...@@ -28,13 +28,14 @@
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
SUBDIRS = \ SUBDIRS = \
m4 \
icons \
src \
po \
data \ data \
docs \ docs \
m4 \
maintainer \ maintainer \
icons \
po \
src \
test \
$(NULL) $(NULL)
# - nautilus-extdir is a foo directory so that make distcheck has a vpath # - nautilus-extdir is a foo directory so that make distcheck has a vpath
......
...@@ -66,16 +66,10 @@ if test "${PKG_CONFIG}" = "no"; then ...@@ -66,16 +66,10 @@ if test "${PKG_CONFIG}" = "no"; then
AC_MSG_ERROR([You need to install pkg-config]) AC_MSG_ERROR([You need to install pkg-config])
fi fi
# Oldest supported distribution as of Feb. 2015: Ubuntu 12.04 LTS # required versions of tools and libraries
glib_required=2.32.1 source ${0%/*}/na_required_versions
gtk_required=3.4.1
intltool_required=0.50.2
nautilus_required=3.4.1
# localization # localization
# note that this same intltool version is also required by autogen.sh
# and thus set in maintainer/run-autogen.sh script
IT_PROG_INTLTOOL([${intltool_required}]) IT_PROG_INTLTOOL([${intltool_required}])
GETTEXT_PACKAGE=${PACKAGE} GETTEXT_PACKAGE=${PACKAGE}
AC_SUBST([GETTEXT_PACKAGE]) AC_SUBST([GETTEXT_PACKAGE])
...@@ -93,7 +87,7 @@ if test "${GLIB_GENMARSHAL}" = "no"; then ...@@ -93,7 +87,7 @@ if test "${GLIB_GENMARSHAL}" = "no"; then
let na_fatal_count+=1 let na_fatal_count+=1
fi fi
# Have and want GConf support ? # Have and want GConf support ?
# As of 3.4 release, we are deprecating GConf, disabled it by default. # As of 3.4 release, we are deprecating GConf, disabling it by default.
# We only search for the libraries when explicitely required from # We only search for the libraries when explicitely required from
# configure. This is a first step deprecation; in a second step, we # configure. This is a first step deprecation; in a second step, we
# will emit a warning. # will emit a warning.
...@@ -105,8 +99,8 @@ NA_CHECK_MODULE([GTK3], [gtk+-3.0], [${gtk_required}]) ...@@ -105,8 +99,8 @@ NA_CHECK_MODULE([GTK3], [gtk+-3.0], [${gtk_required}])
NA_CHECK_MODULE([GLIB], [glib-2.0], [${glib_required}]) NA_CHECK_MODULE([GLIB], [glib-2.0], [${glib_required}])
NA_CHECK_MODULE([GMODULE], [gmodule-2.0],[${glib_required}]) NA_CHECK_MODULE([GMODULE], [gmodule-2.0],[${glib_required}])
NA_CHECK_MODULE([GIO_UNIX],[gio-unix-2.0]) NA_CHECK_MODULE([GIO_UNIX],[gio-unix-2.0])
NA_CHECK_MODULE([GTOP], [libgtop-2.0],[2.23.1]) NA_CHECK_MODULE([GTOP], [libgtop-2.0],[${gtop_required}])
NA_CHECK_MODULE([LIBXML], [libxml-2.0], [2.6]) NA_CHECK_MODULE([LIBXML], [libxml-2.0], [${xml_required}])
NA_CHECK_MODULE([UUID], [uuid]) NA_CHECK_MODULE([UUID], [uuid])
# target a file manager (nautilus, nemo, ...) # target a file manager (nautilus, nemo, ...)
...@@ -136,26 +130,28 @@ AC_CONFIG_FILES([ ...@@ -136,26 +130,28 @@ AC_CONFIG_FILES([
docs/nact/Makefile docs/nact/Makefile
docs/reference/Makefile docs/reference/Makefile
docs/reference/version.xml docs/reference/version.xml
m4/Makefile
icons/Makefile icons/Makefile
icons/16x16/Makefile icons/16x16/Makefile
icons/22x22/Makefile icons/22x22/Makefile
icons/32x32/Makefile icons/32x32/Makefile
icons/48x48/Makefile icons/48x48/Makefile
icons/scalable/Makefile icons/scalable/Makefile
m4/Makefile
maintainer/Makefile
po/Makefile.in
src/Makefile src/Makefile
src/api/Makefile src/api/Makefile
src/core/Makefile src/core/Makefile
src/io-desktop/Makefile src/io-desktop/Makefile
src/io-gconf/Makefile src/io-gconf/Makefile
src/io-xml/Makefile src/io-xml/Makefile
src/nact/Makefile
src/plugin-menu/Makefile src/plugin-menu/Makefile
src/plugin-tracker/Makefile src/plugin-tracker/Makefile
src/nact/Makefile
src/test/Makefile src/test/Makefile
src/utils/Makefile src/utils/Makefile
po/Makefile.in test/Makefile
maintainer/Makefile test/plugman/Makefile
]) ])
# Enable deprecated functions ? # Enable deprecated functions ?
......
...@@ -73,7 +73,8 @@ for d in $(find ${top_srcdir} -maxdepth 2 -type d -name 'nautilus-actions-*'); d ...@@ -73,7 +73,8 @@ for d in $(find ${top_srcdir} -maxdepth 2 -type d -name 'nautilus-actions-*'); d
rm -fr $d rm -fr $d
done done
REQUIRED_INTLTOOL_VERSION=0.35.5 # tools required version
source ${top_srcdir}/na_required_versions
# requires gtk-doc package # requires gtk-doc package
# used for Developer Reference Manual generation (devhelp) # used for Developer Reference Manual generation (devhelp)
......
...@@ -47,11 +47,6 @@ AM_CPPFLAGS += \ ...@@ -47,11 +47,6 @@ AM_CPPFLAGS += \
$(NAUTILUS_ACTIONS_CFLAGS) \ $(NAUTILUS_ACTIONS_CFLAGS) \
$(NULL) $(NULL)
BUILT_SOURCES = \
na-marshal.c \
na-marshal.h \
$(NULL)
libna_core_la_SOURCES = \ libna_core_la_SOURCES = \
na-about.c \ na-about.c \
na-about.h \ na-about.h \
...@@ -127,13 +122,6 @@ libna_core_la_SOURCES = \ ...@@ -127,13 +122,6 @@ libna_core_la_SOURCES = \
$(BUILT_SOURCES) \ $(BUILT_SOURCES) \
$(NULL) $(NULL)
na-marshal.h: na-marshal.def $(GLIB_GENMARSHAL)
$(GLIB_GENMARSHAL) $< --header --prefix=na_cclosure_marshal > $@
na-marshal.c: na-marshal.def $(GLIB_GENMARSHAL)
echo "#include \"na-marshal.h\"" > $@
$(GLIB_GENMARSHAL) $< --body --prefix=na_cclosure_marshal >> $@
libna_core_la_LIBADD = \ libna_core_la_LIBADD = \
$(NAUTILUS_ACTIONS_LIBS) \ $(NAUTILUS_ACTIONS_LIBS) \
$(NULL) $(NULL)
...@@ -160,12 +148,10 @@ importmode_data_DATA = \ ...@@ -160,12 +148,10 @@ importmode_data_DATA = \
$(NULL) $(NULL)
CLEANFILES = \ CLEANFILES = \
$(BUILT_SOURCES) \
$(NULL) $(NULL)
EXTRA_DIST = \ EXTRA_DIST = \
$(ui_data_DATA) \ $(ui_data_DATA) \
$(exportformat_data_DATA) \ $(exportformat_data_DATA) \
$(importmode_data_DATA) \ $(importmode_data_DATA) \
na-marshal.def \
$(NULL) $(NULL)
...@@ -121,6 +121,28 @@ na_gtk_utils_dump_children( GtkContainer *container ) ...@@ -121,6 +121,28 @@ na_gtk_utils_dump_children( GtkContainer *container )
} }
#endif #endif
/*
* na_gtk_utils_connect_widget_by_name:
* @container: a #GtkContainer, usually the #GtkWindow toplevel.
* @name: the name of the searched widget.
* @signal: the name of the signal to connect the #callabck to.
* @cb: the callback
* @user_data:
*
* Connect the signal to the widget.
*/
void
na_gtk_utils_connect_widget_by_name(
GtkContainer *container, const gchar *name,
const gchar *signal, GCallback cb, void *user_data )
{
GtkWidget *widget;
widget = na_gtk_utils_find_widget_by_name( container, name );
g_return_if_fail( widget && GTK_IS_WIDGET( widget ));
g_signal_connect( G_OBJECT( widget ), signal, cb, user_data );
}
/** /**
* na_gtk_utils_restore_position_window: * na_gtk_utils_restore_position_window:
* @toplevel: the #GtkWindow window. * @toplevel: the #GtkWindow window.
......
...@@ -41,7 +41,13 @@ G_BEGIN_DECLS ...@@ -41,7 +41,13 @@ G_BEGIN_DECLS
/* widget hierarchy /* widget hierarchy
*/ */
GtkWidget *na_gtk_utils_find_widget_by_name( GtkContainer *container, const gchar *name ); GtkWidget *na_gtk_utils_find_widget_by_name ( GtkContainer *container,
const gchar *name );
void na_gtk_utils_connect_widget_by_name( GtkContainer *container,
const gchar *name,
const gchar *signal,
GCallback cb,
void *user_data );
#ifdef NA_MAINTAINER_MODE #ifdef NA_MAINTAINER_MODE
void na_gtk_utils_dump_children ( GtkContainer *container ); void na_gtk_utils_dump_children ( GtkContainer *container );
......
...@@ -31,9 +31,7 @@ ...@@ -31,9 +31,7 @@
#include <config.h> #include <config.h>
#endif #endif
#include <api/na-iduplicable.h> #include "api/na-iduplicable.h"
#include "na-marshal.h"
/* private interface data /* private interface data
*/ */
...@@ -162,7 +160,7 @@ interface_base_init( NAIDuplicableInterface *klass ) ...@@ -162,7 +160,7 @@ interface_base_init( NAIDuplicableInterface *klass )
G_CALLBACK( on_modified_changed_class_handler ), G_CALLBACK( on_modified_changed_class_handler ),
NULL, NULL,
NULL, NULL,
na_cclosure_marshal_VOID__POINTER_BOOLEAN, NULL,
G_TYPE_NONE, G_TYPE_NONE,
2, 2,
G_TYPE_POINTER, G_TYPE_BOOLEAN ); G_TYPE_POINTER, G_TYPE_BOOLEAN );
...@@ -194,7 +192,7 @@ interface_base_init( NAIDuplicableInterface *klass ) ...@@ -194,7 +192,7 @@ interface_base_init( NAIDuplicableInterface *klass )
G_CALLBACK( on_valid_changed_class_handler ), G_CALLBACK( on_valid_changed_class_handler ),
NULL, NULL,
NULL, NULL,
na_cclosure_marshal_VOID__POINTER_BOOLEAN, NULL,
G_TYPE_NONE, G_TYPE_NONE,
2, 2,
G_TYPE_POINTER, G_TYPE_BOOLEAN ); G_TYPE_POINTER, G_TYPE_BOOLEAN );
......
...@@ -691,12 +691,12 @@ na_io_provider_get_name( const NAIOProvider *provider ) ...@@ -691,12 +691,12 @@ na_io_provider_get_name( const NAIOProvider *provider )
name = NULL; name = NULL;
name = NA_IIO_PROVIDER_GET_INTERFACE( provider->private->provider )->get_name( provider->private->provider ); name = NA_IIO_PROVIDER_GET_INTERFACE( provider->private->provider )->get_name( provider->private->provider );
if( !name ){ if( !name ){
g_warning( "%s: NAIIOProvider %s get_name() interface returns NULL", thisfn, provider->private->id ); g_message( "%s: NAIIOProvider %s get_name() interface returns NULL", thisfn, provider->private->id );
name = g_strdup( "" ); name = g_strdup( "" );
} }
} else { } else {
g_warning( "%s: NAIIOProvider %s doesn't support get_name() interface", thisfn, provider->private->id ); g_message( "%s: NAIIOProvider %s is not available or doesn't support get_name() interface", thisfn, provider->private->id );
} }
} }
......
...@@ -36,13 +36,12 @@ ...@@ -36,13 +36,12 @@
#include <string.h> #include <string.h>
#include <strings.h> #include <strings.h>
#include <api/na-boxed.h> #include "api/na-boxed.h"
#include <api/na-data-types.h> #include "api/na-data-types.h"
#include <api/na-core-utils.h> #include "api/na-core-utils.h"
#include <api/na-timeout.h> #include "api/na-timeout.h"
#include "na-settings.h" #include "na-settings.h"
#include "na-marshal.h"
#define NA_SETTINGS_TYPE ( settings_get_type()) #define NA_SETTINGS_TYPE ( settings_get_type())
#define NA_SETTINGS( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, NA_SETTINGS_TYPE, NASettings )) #define NA_SETTINGS( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, NA_SETTINGS_TYPE, NASettings ))
...@@ -318,7 +317,7 @@ class_init( NASettingsClass *klass ) ...@@ -318,7 +317,7 @@ class_init( NASettingsClass *klass )
G_CALLBACK( on_key_changed_final_handler ), G_CALLBACK( on_key_changed_final_handler ),
NULL, /* accumulator */ NULL, /* accumulator */
NULL, /* accumulator data */ NULL, /* accumulator data */
na_cclosure_marshal_VOID__STRING_STRING_POINTER_BOOLEAN, NULL,
G_TYPE_NONE, G_TYPE_NONE,
4, 4,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN ); G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN );
......
...@@ -44,15 +44,9 @@ AM_CPPFLAGS += \ ...@@ -44,15 +44,9 @@ AM_CPPFLAGS += \
$(NULL) $(NULL)
BUILT_SOURCES = \ BUILT_SOURCES = \
base-marshal.c \
base-marshal.h \
nact-marshal.c \
nact-marshal.h \
$(NULL) $(NULL)
nautilus_actions_config_tool_SOURCES = \ nautilus_actions_config_tool_SOURCES = \
base-application.c \
base-application.h \
base-assistant.c \ base-assistant.c \
base-assistant.h \ base-assistant.h \
base-builder.c \ base-builder.c \
...@@ -61,19 +55,11 @@ nautilus_actions_config_tool_SOURCES = \ ...@@ -61,19 +55,11 @@ nautilus_actions_config_tool_SOURCES = \
base-dialog.h \ base-dialog.h \
base-gtk-utils.c \ base-gtk-utils.c \
base-gtk-utils.h \ base-gtk-utils.h \
base-isession.c \
base-isession.h \
base-iunique.c \
base-iunique.h \
base-keysyms.h \ base-keysyms.h \
base-window.c \ base-window.c \
base-window.h \ base-window.h \
egg-desktop-file.c \ egg-desktop-file.c \
egg-desktop-file.h \ egg-desktop-file.h \
egg-sm-client.c \
egg-sm-client.h \
egg-sm-client-private.h \
egg-sm-client-xsmp.c \
egg-tree-multi-dnd.c \ egg-tree-multi-dnd.c \
egg-tree-multi-dnd.h \ egg-tree-multi-dnd.h \
main.c \ main.c \
...@@ -99,6 +85,8 @@ nautilus_actions_config_tool_SOURCES = \ ...@@ -99,6 +85,8 @@ nautilus_actions_config_tool_SOURCES = \
nact-ibasenames-tab.h \ nact-ibasenames-tab.h \
nact-icapabilities-tab.c \ nact-icapabilities-tab.c \
nact-icapabilities-tab.h \ nact-icapabilities-tab.h \
nact-icommand-tab.c \
nact-icommand-tab.h \
nact-icon-chooser.c \ nact-icon-chooser.c \
nact-icon-chooser.h \ nact-icon-chooser.h \
nact-ienvironment-tab.c \ nact-ienvironment-tab.c \
...@@ -107,33 +95,27 @@ nautilus_actions_config_tool_SOURCES = \ ...@@ -107,33 +95,27 @@ nautilus_actions_config_tool_SOURCES = \
nact-iexecution-tab.h \ nact-iexecution-tab.h \
nact-ifolders-tab.c \ nact-ifolders-tab.c \
nact-ifolders-tab.h \ nact-ifolders-tab.h \
nact-icommand-tab.c \
nact-icommand-tab.h \
nact-imimetypes-tab.c \ nact-imimetypes-tab.c \
nact-imimetypes-tab.h \ nact-imimetypes-tab.h \
nact-iproperties-tab.c \ nact-iproperties-tab.c \
nact-iproperties-tab.h \ nact-iproperties-tab.h \
nact-ischemes-tab.c \ nact-ischemes-tab.c \
nact-ischemes-tab.h \ nact-ischemes-tab.h \
nact-main-statusbar.c \
nact-main-statusbar.h \
nact-main-tab.c \ nact-main-tab.c \
nact-main-tab.h \ nact-main-tab.h \
nact-main-toolbar.c \ nact-main-toolbar.c \
nact-main-toolbar.h \ nact-main-toolbar.h \
nact-main-window.c \ nact-main-window.c \
nact-main-window.h \ nact-main-window.h \
nact-main-window-def.h \
nact-match-list.c \ nact-match-list.c \
nact-match-list.h \ nact-match-list.h \
nact-menubar.c \ nact-menu.c \
nact-menubar.h \ nact-menu.h \
nact-menubar-priv.h \ nact-menu-edit.c \
nact-menubar-edit.c \ nact-menu-edit.h \
nact-menubar-file.c \ nact-menu-file.c \
nact-menubar-help.c \ nact-menu-file.h \
nact-menubar-maintainer.c \
nact-menubar-tools.c \
nact-menubar-view.c \
nact-preferences-editor.c \ nact-preferences-editor.c \
nact-preferences-editor.h \ nact-preferences-editor.h \
nact-providers-list.c \ nact-providers-list.c \
...@@ -142,6 +124,8 @@ nautilus_actions_config_tool_SOURCES = \ ...@@ -142,6 +124,8 @@ nautilus_actions_config_tool_SOURCES = \
nact-schemes-list.h \ nact-schemes-list.h \
nact-sort-buttons.c \ nact-sort-buttons.c \
nact-sort-buttons.h \ nact-sort-buttons.h \
nact-statusbar.c \
nact-statusbar.h \
nact-tree-ieditable.c \ nact-tree-ieditable.c \
nact-tree-ieditable.h \ nact-tree-ieditable.h \
nact-tree-model.c \ nact-tree-model.c \
...@@ -153,20 +137,6 @@ nautilus_actions_config_tool_SOURCES = \ ...@@ -153,20 +137,6 @@ nautilus_actions_config_tool_SOURCES = \
$(BUILT_SOURCES) \ $(BUILT_SOURCES) \
$(NULL) $(NULL)
base-marshal.h: base-marshal.def $(GLIB_GENMARSHAL)
$(GLIB_GENMARSHAL) $< --header --prefix=base_cclosure_marshal > $@
base-marshal.c: base-marshal.def $(GLIB_GENMARSHAL)
echo "#include \"base-marshal.h\"" > $@ && \
$(GLIB_GENMARSHAL) $< --body --prefix=base_cclosure_marshal >> $@
nact-marshal.h: nact-marshal.def $(GLIB_GENMARSHAL)
$(GLIB_GENMARSHAL) $< --header --prefix=nact_cclosure_marshal > $@
nact-marshal.c: nact-marshal.def $(GLIB_GENMARSHAL)
echo "#include \"nact-marshal.h\"" > $@ && \
$(GLIB_GENMARSHAL) $< --body --prefix=nact_cclosure_marshal >> $@
nautilus_actions_config_tool_LDADD = \ nautilus_actions_config_tool_LDADD = \
$(top_builddir)/src/core/libna-core.la \ $(top_builddir)/src/core/libna-core.la \
$(NAUTILUS_ACTIONS_LIBS) \ $(NAUTILUS_ACTIONS_LIBS) \
...@@ -182,9 +152,12 @@ ui_files = \ ...@@ -182,9 +152,12 @@ ui_files = \
nact-add-scheme.ui \ nact-add-scheme.ui \
nact-assistant-export.ui \ nact-assistant-export.ui \
nact-assistant-import.ui \ nact-assistant-import.ui \
nact-confirm-logout.ui \
nact-export-ask.ui \
nact-icon-chooser.ui \ nact-icon-chooser.ui \
nact-legend.ui \
nact-main-window.ui \
nact-preferences.ui \ nact-preferences.ui \
nautilus-actions-config-tool.ui \
$(NULL) $(NULL)
images_files = \ images_files = \
......
This diff is collapsed.
/*
* Nautilus-Actions
* A Nautilus extension which offers configurable context menu actions.
*
* Copyright (C) 2005 The GNOME Foundation
* Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
* Copyright (C) 2009-2014 Pierre Wieser and others (see AUTHORS)
*
* Nautilus-Actions is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Nautilus-Actions is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Nautilus-Actions; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
* Authors:
* Frederic Ruaudel <grumz@grumz.net>
* Rodrigo Moya <rodrigo@gnome-db.org>
* Pierre Wieser <pwieser@trychlos.org>
* ... and many others (see AUTHORS)
*/
#ifndef __BASE_APPLICATION_H__
#define __BASE_APPLICATION_H__
/**
* SECTION: base-application
* @title: BaseApplication
* @short_description: The Base Application application base class definition
* @include: base-application.h
*
* #BaseApplication is the base class for the application part of Gtk programs.
* It aims at providing all common services. It interacts with #BaseBuilder
* and #BaseWindow classes.
*
* #BaseApplication is a pure virtual class. A Gtk program should derive
* its own class from #BaseApplication, and instantiate it in its main()
* program entry point.
*
* <example>
* <programlisting>
* #include "my-application.h"
*
* int
* main( int argc, char **argv )
* {
* MyApplication *appli;
* int code;
*
* appli = my_application_new();
* code = base_appliction_run_with_args( BASE_APPLICATION( appli ), argc, argv );
* g_object_unref( appli );
*
* return( code );
* }
* </programlisting>
* </example>
*
* main BaseApplication NactApplication BaseWindow NactWindow
* =================== =================== =================== =================== ===================
* appli = nact_application_new()
* --------------------+--------------------+--------------------+--------------------+-------------------
* appli = g_object_new()
* set properties
* application name
* icon name
* description
* command-line definitions
* unique name (if apply)
* --------------------+--------------------+--------------------+--------------------+-------------------
* ret = base_application_run_with_args( appli, argc, argv )
* --------------------+--------------------+--------------------+--------------------+-------------------
* init i18n
* init application name
* init gtk with command-line options
* manage command-line options
* --------------------+--------------------+--------------------+--------------------+-------------------
* manage specific command-line options
* calling parent class if ok to continue
* setting application code else
* --------------------+--------------------+--------------------+--------------------+-------------------
* init unique manager
* unique app name must have been set at this time
* application name should have been set at this time
* init session manager
* init icon name
* create window(s)
* --------------------+--------------------+--------------------+--------------------+-------------------
* foreach window to create
* create BaseWindow-derived window
* --------------------+--------------------+--------------------+--------------------+-------------------
* on class init
* init common builder
* --------------------+--------------------+--------------------+--------------------+-------------------
* init window
* --------------------+--------------------+--------------------+--------------------+-------------------
* load and init gtk toplevel
* init window
* show widgets
* --------------------+--------------------+--------------------+--------------------+-------------------
* enter the main loop
* leaving to the main window the
* responsability to gtk_main_quit()
* after having set the application
* exit code.
* --------------------+--------------------+--------------------+--------------------+-------------------
* g_object_unref( appli )
* return( ret )
* =================== =================== =================== =================== ===================
* main BaseApplication NactApplication BaseWindow NactWindow