diff options
| author | Felix Riemann <[email protected]> | 2014-05-03 20:27:10 +0200 | 
|---|---|---|
| committer | raveit65 <[email protected]> | 2018-08-13 19:08:02 +0200 | 
| commit | c2fc00295668a545f2f69d281e100cafd88c2098 (patch) | |
| tree | 2dac836870ef4f261c3837f1f8d32159359e0f3a | |
| parent | 4b4a6119bce67e6b680077e31b070e37c5f11d67 (diff) | |
| download | eom-c2fc00295668a545f2f69d281e100cafd88c2098.tar.bz2 eom-c2fc00295668a545f2f69d281e100cafd88c2098.tar.xz | |
Remove EomDialog helper class
EomDialog has become obsolete with the switch to GtkBuilder templates.
origin commits:
https://gitlab.gnome.org/GNOME/eog/commit/9a60071
| -rw-r--r-- | doc/reference/eom-sections.txt | 18 | ||||
| -rw-r--r-- | src/Makefile.am | 2 | ||||
| -rw-r--r-- | src/eom-dialog.c | 232 | ||||
| -rw-r--r-- | src/eom-dialog.h | 75 | ||||
| -rw-r--r-- | src/eom-metadata-sidebar.c | 1 | ||||
| -rw-r--r-- | src/eom-window.h | 1 | 
6 files changed, 0 insertions, 329 deletions
| diff --git a/doc/reference/eom-sections.txt b/doc/reference/eom-sections.txt index 766318c..a350c53 100644 --- a/doc/reference/eom-sections.txt +++ b/doc/reference/eom-sections.txt @@ -520,24 +520,6 @@ EOM_METADATA_READER_JPG_GET_CLASS  </SECTION>  <SECTION> -<FILE>eom-dialog</FILE> -<TITLE>EomDialog</TITLE> -EomDialog -eom_dialog_construct -eom_dialog_show -eom_dialog_hide -eom_dialog_get_controls -<SUBSECTION Standard> -EOM_DIALOG -EOM_IS_DIALOG -EOM_TYPE_DIALOG -eom_dialog_get_type -EOM_DIALOG_CLASS -EOM_IS_DIALOG_CLASS -EOM_DIALOG_GET_CLASS -</SECTION> - -<SECTION>  <FILE>eom-image-save-info</FILE>  <TITLE>EomImageSaveInfo</TITLE>  EomImageSaveInfo diff --git a/src/Makefile.am b/src/Makefile.am index 13f890a..57313f8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -44,7 +44,6 @@ INST_H_FILES =				\  	eom-window.h			\  	eom-window-activatable.h	\  	eom-sidebar.h			\ -	eom-dialog.h			\  	eom-properties-dialog.h		\  	eom-error-message-area.h	\  	eom-file-chooser.h		\ @@ -72,7 +71,6 @@ libeom_c_files =			\  	eom-window.c			\  	eom-window-activatable.c	\  	eom-sidebar.c			\ -	eom-dialog.c			\  	eom-preferences-dialog.c	\  	eom-properties-dialog.c		\  	eom-error-message-area.c	\ diff --git a/src/eom-dialog.c b/src/eom-dialog.c deleted file mode 100644 index c99ef99..0000000 --- a/src/eom-dialog.c +++ /dev/null @@ -1,232 +0,0 @@ -/* Eye Of Mate - Image  Dialog - * - * Copyright (C) 2006 The Free Software Foundation - * - * Author: Lucas Rocha <[email protected]> - * - * This program 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. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "eom-dialog.h" - -#include <glib.h> -#include <glib-object.h> -#include <gtk/gtk.h> - -enum { -        PROP_0, -        PROP_PARENT_WINDOW, -}; - -struct _EomDialogPrivate { -	GtkWidget   *dlg; -	GtkBuilder  *xml; -	GtkWindow   *parent; -}; - -G_DEFINE_TYPE_WITH_PRIVATE (EomDialog, eom_dialog, G_TYPE_OBJECT); - -static void -eom_dialog_construct_impl (EomDialog   *dialog, -			   const gchar *ui_file, -			   const gchar *dlg_node) -{ -	EomDialogPrivate *priv; -	gchar *filename; - -	g_return_if_fail (dialog != NULL); -	g_return_if_fail (EOM_IS_DIALOG (dialog)); - -	priv = dialog->priv; - -	filename = g_build_filename (EOM_DATA_DIR, ui_file, NULL); - -	priv->xml = gtk_builder_new (); -	gtk_builder_set_translation_domain (priv->xml, GETTEXT_PACKAGE); -	g_assert (gtk_builder_add_from_file (priv->xml, filename, NULL)); - -	g_free (filename); - -	priv->dlg = GTK_WIDGET (gtk_builder_get_object (priv->xml, dlg_node)); - -	if (priv->parent != NULL) { -		gtk_window_set_transient_for (GTK_WINDOW (priv->dlg), -					      priv->parent); -	} -} - -static void -eom_dialog_show_impl (EomDialog *dialog) -{ -	g_return_if_fail (dialog != NULL); -	g_return_if_fail (EOM_IS_DIALOG (dialog)); - -	gtk_window_present (GTK_WINDOW (dialog->priv->dlg)); -} - -static void -eom_dialog_hide_impl (EomDialog *dialog) -{ -	g_return_if_fail (dialog != NULL); -	g_return_if_fail (EOM_IS_DIALOG (dialog)); - -	gtk_widget_hide (dialog->priv->dlg); -} - -static void -eom_dialog_set_property (GObject      *object, -			 guint         prop_id, -			 const GValue *value, -			 GParamSpec   *pspec) -{ -	EomDialog *dialog = EOM_DIALOG (object); - -	switch (prop_id) { -		case PROP_PARENT_WINDOW: -			dialog->priv->parent = g_value_get_object (value); -			break; -	} -} - -static void -eom_dialog_get_property (GObject    *object, -			 guint       prop_id, -			 GValue     *value, -			 GParamSpec *pspec) -{ -	EomDialog *dialog = EOM_DIALOG (object); - -	switch (prop_id) { -		case PROP_PARENT_WINDOW: -			g_value_set_object (value, dialog->priv->parent); -			break; -	} -} - -static void -eom_dialog_dispose (GObject *object) -{ -	EomDialog *dialog; -	EomDialogPrivate *priv; - -	g_return_if_fail (object != NULL); -	g_return_if_fail (EOM_IS_DIALOG (object)); - -	dialog = EOM_DIALOG (object); -	priv = dialog->priv; - -	if (priv->dlg) { -		gtk_widget_destroy (priv->dlg); -		priv->dlg = NULL; -	} - -	if (priv->xml) { -		g_object_unref (priv->xml); -		priv->xml = NULL; -	} - -	G_OBJECT_CLASS (eom_dialog_parent_class)->dispose (object); -} - -static void -eom_dialog_class_init (EomDialogClass *class) -{ -	GObjectClass *g_object_class = (GObjectClass *) class; - -	g_object_class->dispose = eom_dialog_dispose; -	g_object_class->set_property = eom_dialog_set_property; -	g_object_class->get_property = eom_dialog_get_property; - -	class->construct = eom_dialog_construct_impl; -	class->show = eom_dialog_show_impl; -	class->hide = eom_dialog_hide_impl; - -	g_object_class_install_property (g_object_class, -					 PROP_PARENT_WINDOW, -					 g_param_spec_object ("parent-window", -							      "Parent window", -							      "Parent window", -							      GTK_TYPE_WINDOW, -							      G_PARAM_READWRITE | -							      G_PARAM_CONSTRUCT_ONLY | -							      G_PARAM_STATIC_NAME | -							      G_PARAM_STATIC_NICK | -							      G_PARAM_STATIC_BLURB)); -} - -static void -eom_dialog_init (EomDialog *dialog) -{ -	dialog->priv = eom_dialog_get_instance_private (dialog); - -	dialog->priv->dlg = NULL; -	dialog->priv->xml = NULL; -	dialog->priv->parent = NULL; -} - -void -eom_dialog_construct (EomDialog   *dialog, -		      const gchar *ui_file, -		      const gchar *dlg_node) -{ -	EomDialogClass *klass = EOM_DIALOG_GET_CLASS (dialog); -	klass->construct (dialog, ui_file, dlg_node); -} - -void -eom_dialog_show (EomDialog *dialog) -{ -	EomDialogClass *klass = EOM_DIALOG_GET_CLASS (dialog); -	klass->show (dialog); -} - -void -eom_dialog_hide (EomDialog *dialog) -{ -	EomDialogClass *klass = EOM_DIALOG_GET_CLASS (dialog); -	klass->hide (dialog); -} - -void -eom_dialog_get_controls (EomDialog   *dialog, -			 const gchar *property_id, -			 ...) -{ -	EomDialogPrivate *priv; -        GtkWidget **wptr; -        va_list varargs; - -	g_return_if_fail (dialog != NULL); -	g_return_if_fail (EOM_IS_DIALOG (dialog)); - -	priv = dialog->priv; - -        va_start (varargs, property_id); - -        while (property_id != NULL) -        { -                wptr = va_arg (varargs, GtkWidget **); -                *wptr = GTK_WIDGET (gtk_builder_get_object (priv->xml, -							    property_id)); - -                property_id = va_arg (varargs, const gchar *); -        } - -        va_end (varargs); -} diff --git a/src/eom-dialog.h b/src/eom-dialog.h deleted file mode 100644 index d2b92ac..0000000 --- a/src/eom-dialog.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Eye Of Mate - EOM Dialog - * - * Copyright (C) 2006 The Free Software Foundation - * - * Author: Lucas Rocha <[email protected]> - * - * This program 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. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef __EOM_DIALOG_H__ -#define __EOM_DIALOG_H__ - -#include <glib.h> -#include <glib-object.h> - -G_BEGIN_DECLS - -typedef struct _EomDialog EomDialog; -typedef struct _EomDialogClass EomDialogClass; -typedef struct _EomDialogPrivate EomDialogPrivate; - -#define EOM_TYPE_DIALOG            (eom_dialog_get_type ()) -#define EOM_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), EOM_TYPE_DIALOG, EomDialog)) -#define EOM_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  EOM_TYPE_DIALOG, EomDialogClass)) -#define EOM_IS_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), EOM_TYPE_DIALOG)) -#define EOM_IS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  EOM_TYPE_DIALOG)) -#define EOM_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  EOM_TYPE_DIALOG, EomDialogClass)) - -struct _EomDialog { -	GObject object; - -	EomDialogPrivate *priv; -}; - -struct _EomDialogClass { -	GObjectClass parent_class; - -	void    (* construct)   (EomDialog   *dialog, -				 const gchar *ui_file, -				 const gchar *dlg_node); - -	void    (* show)        (EomDialog   *dialog); - -	void    (* hide)        (EomDialog   *dialog); -}; - -GType   eom_dialog_get_type      (void) G_GNUC_CONST; - -void    eom_dialog_construct     (EomDialog   *dialog, -				  const gchar *ui_file, -				  const gchar *dlg_node); - -void    eom_dialog_show	         (EomDialog *dialog); - -void    eom_dialog_hide	         (EomDialog *dialog); - -void    eom_dialog_get_controls  (EomDialog   *dialog, -				  const gchar *property_id, -				  ...); - -G_END_DECLS - -#endif /* __EOM_DIALOG_H__ */ diff --git a/src/eom-metadata-sidebar.c b/src/eom-metadata-sidebar.c index 9c13c03..c0bb0dc 100644 --- a/src/eom-metadata-sidebar.c +++ b/src/eom-metadata-sidebar.c @@ -32,7 +32,6 @@  #include <glib/gi18n.h>  #include <gtk/gtk.h> -#include "eom-dialog.h"  #include "eom-image.h"  #include "eom-metadata-sidebar.h"  #include "eom-properties-dialog.h" diff --git a/src/eom-window.h b/src/eom-window.h index c90d291..04e028b 100644 --- a/src/eom-window.h +++ b/src/eom-window.h @@ -30,7 +30,6 @@  #include "eom-list-store.h"  #include "eom-image.h" -#include "eom-dialog.h"  #include <glib.h>  #include <glib-object.h> | 
