[dia/zbrown/remove-libgnome: 1/3] Remove usage of libgnome from app_procs.c
- From: Zander <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia/zbrown/remove-libgnome: 1/3] Remove usage of libgnome from app_procs.c
- Date: Thu, 6 Dec 2018 00:30:58 +0000 (UTC)
commit c12f5abc4c9bd8c52a5ae13a7ccd380775ffedbf
Author: Zander Brown <zbrown gnome org>
Date: Wed Dec 5 23:31:42 2018 +0000
Remove usage of libgnome from app_procs.c
app/app_procs.c | 76 ---------------------------------------------------------
1 file changed, 76 deletions(-)
---
diff --git a/app/app_procs.c b/app/app_procs.c
index 9b8734a3..a55692e3 100644
--- a/app/app_procs.c
+++ b/app/app_procs.c
@@ -34,12 +34,6 @@
#include <png.h> /* just for the version stuff */
#endif
-#ifdef HAVE_GNOME
-#undef GTK_DISABLE_DEPRECATED
-/* /usr/include/libgnomeui-2.0/libgnomeui/gnome-entry.h:58: error: expected specifier-qualifier-list before
'GtkCombo' */
-#include <gnome.h>
-#endif
-
#include <gtk/gtk.h>
#include <gmodule.h>
@@ -96,44 +90,6 @@ static void print_filters_list (gboolean verbose);
static gboolean dia_is_interactive = FALSE;
-#ifdef HAVE_GNOME
-
-static void
-session_die (gpointer client_data)
-{
- gtk_main_quit ();
-}
-
-static int
-save_state (GnomeClient *client,
- gint phase,
- GnomeRestartStyle save_style,
- gint shutdown,
- GnomeInteractStyle interact_style,
- gint fast,
- gpointer client_data)
-{
- gchar *argv[20];
- gint i = 0;
- GList *l;
- Diagram *dia;
-
- argv[i++] = "dia";
-
- for(l = dia_open_diagrams(); l != NULL; l = g_list_next(l)) {
- dia = (Diagram *)l->data;
- if(!dia->unsaved) {
- argv[i++] = dia->filename;
- }
- }
-
- gnome_client_set_restart_command (client, i, argv);
- gnome_client_set_clone_command (client, i, argv);
-
- return TRUE;
-}
-#endif
-
static char *
build_output_file_name(const char *infname, const char *format, const char *outdir)
{
@@ -416,9 +372,6 @@ dump_dependencies(void)
#ifdef HAVE_CAIRO
"cairo "
#endif
-#ifdef HAVE_GNOME
- "gnome "
-#endif
#ifdef HAVE_LIBART
"libart "
#endif
@@ -678,9 +631,6 @@ app_init (int argc, char **argv)
static gboolean version = FALSE;
static gboolean verbose = FALSE;
static gboolean log_to_stderr = FALSE;
-#ifdef HAVE_GNOME
- GnomeClient *client;
-#endif
static char *export_file_name = NULL;
static char *export_file_format = NULL;
static char *size = NULL;
@@ -749,10 +699,8 @@ app_init (int argc, char **argv)
context = g_option_context_new(_("[FILE...]"));
g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
-#ifndef HAVE_GNOME
/* avoid to add it a second time */
g_option_context_add_group (context, gtk_get_option_group (FALSE));
-#endif
if (argv) {
GError *error = NULL;
@@ -812,34 +760,10 @@ app_init (int argc, char **argv)
}
if (argv && dia_is_interactive) {
-#ifdef HAVE_GNOME
- GnomeProgram *program =
- gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE,
- argc, argv,
- /* haven't found a quick way to pass GOption here */
- GNOME_PARAM_GOPTION_CONTEXT, context,
- GNOME_PROGRAM_STANDARD_PROPERTIES,
- GNOME_PARAM_NONE);
- client = gnome_master_client();
- if(client == NULL) {
- g_warning(_("Can't connect to session manager!\n"));
- }
- else {
- g_signal_connect(G_OBJECT (client), "save_yourself",
- G_CALLBACK (save_state), NULL);
- g_signal_connect(G_OBJECT (client), "die",
- G_CALLBACK (session_die), NULL);
- }
-
- /* This smaller icon is 48x48, standard Gnome size */
- /* gnome_window_icon_set_default_from_file (GNOME_ICONDIR"/dia_gnome_icon.png");*/
-
-#else
# if defined(G_THREADS_ENABLED) && !GLIB_CHECK_VERSION(2,32,0)
g_thread_init (NULL);
# endif
gtk_init(&argc, &argv);
-#endif
}
else {
#if defined(G_THREADS_ENABLED) && !GLIB_CHECK_VERSION(2,32,0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]