aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-07-05 11:41:00 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-06 04:40:49 +0800
commitaf39ee96f037574e18295f429f064cb66e051c8f (patch)
treee373e7c04c9a1f65e7eaaf3c5acae2ddfd9f83ba /e-util
parent70bce028f771c5366fc2d4c6e3bc49fcd3da1a10 (diff)
downloadgsoc2013-evolution-af39ee96f037574e18295f429f064cb66e051c8f.tar
gsoc2013-evolution-af39ee96f037574e18295f429f064cb66e051c8f.tar.gz
gsoc2013-evolution-af39ee96f037574e18295f429f064cb66e051c8f.tar.bz2
gsoc2013-evolution-af39ee96f037574e18295f429f064cb66e051c8f.tar.lz
gsoc2013-evolution-af39ee96f037574e18295f429f064cb66e051c8f.tar.xz
gsoc2013-evolution-af39ee96f037574e18295f429f064cb66e051c8f.tar.zst
gsoc2013-evolution-af39ee96f037574e18295f429f064cb66e051c8f.zip
Remove GalViewNewDialog.
No longer user.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/Makefile.am3
-rw-r--r--e-util/e-util.h1
-rw-r--r--e-util/gal-view-instance-save-as-dialog.c1
-rw-r--r--e-util/gal-view-new-dialog.c290
-rw-r--r--e-util/gal-view-new-dialog.h83
-rw-r--r--e-util/gal-view-new-dialog.ui177
6 files changed, 0 insertions, 555 deletions
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index 479a6dc818..1f6988e16b 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -45,7 +45,6 @@ ui_DATA = \
e-timezone-dialog.ui \
filter.ui \
gal-view-instance-save-as-dialog.ui \
- gal-view-new-dialog.ui \
$(NULL)
xpm_icons = \
@@ -334,7 +333,6 @@ evolution_util_include_HEADERS = \
gal-view-factory.h \
gal-view-instance-save-as-dialog.h \
gal-view-instance.h \
- gal-view-new-dialog.h \
gal-view.h \
$(NULL)
@@ -571,7 +569,6 @@ libevolution_util_la_SOURCES = \
gal-view-factory.c \
gal-view-instance-save-as-dialog.c \
gal-view-instance.c \
- gal-view-new-dialog.c \
gal-view.c \
$(PLATFORM_SOURCES) \
$(NULL)
diff --git a/e-util/e-util.h b/e-util/e-util.h
index ebd44b6af1..36311bd17d 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -228,7 +228,6 @@
#include <e-util/gal-view-factory.h>
#include <e-util/gal-view-instance-save-as-dialog.h>
#include <e-util/gal-view-instance.h>
-#include <e-util/gal-view-new-dialog.h>
#include <e-util/gal-view.h>
#undef __E_UTIL_H_INSIDE__
diff --git a/e-util/gal-view-instance-save-as-dialog.c b/e-util/gal-view-instance-save-as-dialog.c
index 71ac113049..54210e39be 100644
--- a/e-util/gal-view-instance-save-as-dialog.c
+++ b/e-util/gal-view-instance-save-as-dialog.c
@@ -30,7 +30,6 @@
#include "e-misc-utils.h"
#include "e-util-private.h"
-#include "gal-view-new-dialog.h"
G_DEFINE_TYPE (GalViewInstanceSaveAsDialog, gal_view_instance_save_as_dialog, GTK_TYPE_DIALOG)
diff --git a/e-util/gal-view-new-dialog.c b/e-util/gal-view-new-dialog.c
deleted file mode 100644
index d17dd94f82..0000000000
--- a/e-util/gal-view-new-dialog.c
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gal-view-new-dialog.h"
-
-#include <glib/gi18n.h>
-
-#include "e-misc-utils.h"
-#include "e-util-private.h"
-#include "e-unicode.h"
-
-enum {
- PROP_0,
- PROP_NAME,
- PROP_FACTORY
-};
-
-G_DEFINE_TYPE (GalViewNewDialog, gal_view_new_dialog, GTK_TYPE_DIALOG)
-
-static void
-gal_view_new_dialog_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GalViewNewDialog *dialog;
- GtkWidget *entry;
-
- dialog = GAL_VIEW_NEW_DIALOG (object);
-
- switch (property_id) {
- case PROP_NAME:
- entry = e_builder_get_widget (dialog->builder, "entry-name");
- if (entry && GTK_IS_ENTRY (entry)) {
- gtk_entry_set_text (GTK_ENTRY (entry), g_value_get_string (value));
- }
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- return;
- }
-}
-
-static void
-gal_view_new_dialog_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GalViewNewDialog *dialog;
- GtkWidget *entry;
-
- dialog = GAL_VIEW_NEW_DIALOG (object);
-
- switch (property_id) {
- case PROP_NAME:
- entry = e_builder_get_widget (dialog->builder, "entry-name");
- if (entry && GTK_IS_ENTRY (entry)) {
- g_value_set_string (value, gtk_entry_get_text (GTK_ENTRY (entry)));
- }
- break;
- case PROP_FACTORY:
- g_value_set_object (value, dialog->selected_factory);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-gal_view_new_dialog_dispose (GObject *object)
-{
- GalViewNewDialog *gal_view_new_dialog = GAL_VIEW_NEW_DIALOG (object);
-
- if (gal_view_new_dialog->builder)
- g_object_unref (gal_view_new_dialog->builder);
- gal_view_new_dialog->builder = NULL;
-
- /* Chain up to parent's dispose() method. */
- G_OBJECT_CLASS (gal_view_new_dialog_parent_class)->dispose (object);
-}
-
-static void
-gal_view_new_dialog_class_init (GalViewNewDialogClass *class)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (class);
- object_class->set_property = gal_view_new_dialog_set_property;
- object_class->get_property = gal_view_new_dialog_get_property;
- object_class->dispose = gal_view_new_dialog_dispose;
-
- g_object_class_install_property (
- object_class,
- PROP_NAME,
- g_param_spec_string (
- "name",
- "Name",
- NULL,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (
- object_class,
- PROP_FACTORY,
- g_param_spec_object (
- "factory",
- "Factory",
- NULL,
- GAL_TYPE_VIEW_FACTORY,
- G_PARAM_READWRITE));
-}
-
-static void
-gal_view_new_dialog_init (GalViewNewDialog *dialog)
-{
- GtkWidget *content_area;
- GtkWidget *parent;
- GtkWidget *widget;
-
- dialog->builder = gtk_builder_new ();
- e_load_ui_builder_definition (
- dialog->builder, "gal-view-new-dialog.ui");
-
- widget = e_builder_get_widget (dialog->builder, "table-top");
- if (!widget) {
- return;
- }
-
- g_object_ref (widget);
-
- parent = gtk_widget_get_parent (widget);
- gtk_container_remove (GTK_CONTAINER (parent), widget);
-
- content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
- gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0);
-
- g_object_unref (widget);
-
- gtk_dialog_add_buttons (
- GTK_DIALOG (dialog),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
-
- gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gtk_window_set_title (GTK_WINDOW (dialog), _("Define New View"));
-
- dialog->collection = NULL;
- dialog->selected_factory = NULL;
-}
-
-GtkWidget *
-gal_view_new_dialog_new (GalViewCollection *collection)
-{
- GtkWidget *widget =
- gal_view_new_dialog_construct (
- g_object_new (GAL_TYPE_VIEW_NEW_DIALOG, NULL),
- collection);
- return widget;
-}
-
-static void
-sensitize_ok_response (GalViewNewDialog *dialog)
-{
- gboolean ok = TRUE;
- const gchar *text;
-
- text = gtk_entry_get_text (GTK_ENTRY (dialog->entry));
- if (!text || !text[0])
- ok = FALSE;
-
- if (!dialog->selected_factory)
- ok = FALSE;
-
- gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, ok);
-}
-
-static gboolean
-selection_func (GtkTreeSelection *selection,
- GtkTreeModel *model,
- GtkTreePath *path,
- gboolean path_currently_selected,
- gpointer data)
-{
- GtkTreeIter iter;
- GalViewNewDialog *dialog = data;
-
- if (path_currently_selected)
- return TRUE;
-
- model = GTK_TREE_MODEL (dialog->list_store);
-
- gtk_tree_model_get_iter (model, &iter, path);
- gtk_tree_model_get (model, &iter, 1, &dialog->selected_factory, -1);
-
- sensitize_ok_response (dialog);
-
- return TRUE;
-}
-
-static void
-entry_changed (GtkWidget *entry,
- gpointer data)
-{
- GalViewNewDialog *dialog = data;
-
- sensitize_ok_response (dialog);
-}
-
-GtkWidget *
-gal_view_new_dialog_construct (GalViewNewDialog *dialog,
- GalViewCollection *collection)
-{
- GList *iterator;
- GtkTreeSelection *selection;
- GtkTreeViewColumn *column;
- GtkCellRenderer *rend;
-
- dialog->collection = collection;
- dialog->list = e_builder_get_widget (dialog->builder,"list-type-list");
- dialog->entry = e_builder_get_widget (dialog->builder, "entry-name");
-
- dialog->list_store = gtk_list_store_new (
- 2, G_TYPE_STRING, G_TYPE_POINTER);
-
- rend = gtk_cell_renderer_text_new ();
- column = gtk_tree_view_column_new_with_attributes (
- "factory title", rend, "text", 0, NULL);
-
- gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->list), column);
-
- iterator = dialog->collection->factory_list;
- for (; iterator; iterator = g_list_next (iterator)) {
- GalViewFactory *factory = iterator->data;
- GtkTreeIter iter;
-
- g_object_ref (factory);
- gtk_list_store_append (
- dialog->list_store, &iter);
- gtk_list_store_set (
- dialog->list_store, &iter,
- 0, gal_view_factory_get_title (factory),
- 1, factory,
- -1);
- }
-
- gtk_tree_view_set_model (
- GTK_TREE_VIEW (dialog->list),
- GTK_TREE_MODEL (dialog->list_store));
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->list));
-
- gtk_tree_selection_set_select_function (
- selection, selection_func, dialog, NULL);
-
- g_signal_connect (
- dialog->entry, "changed",
- G_CALLBACK (entry_changed), dialog);
-
- sensitize_ok_response (dialog);
-
- return GTK_WIDGET (dialog);
-}
-
diff --git a/e-util/gal-view-new-dialog.h b/e-util/gal-view-new-dialog.h
deleted file mode 100644
index 0d0be9c412..0000000000
--- a/e-util/gal-view-new-dialog.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
-#error "Only <e-util/e-util.h> should be included directly."
-#endif
-
-#ifndef GAL_VIEW_NEW_DIALOG_H
-#define GAL_VIEW_NEW_DIALOG_H
-
-#include <gtk/gtk.h>
-#include <e-util/gal-view-collection.h>
-
-/* Standard GObject macros */
-#define GAL_TYPE_VIEW_NEW_DIALOG \
- (gal_view_new_dialog_get_type ())
-#define GAL_VIEW_NEW_DIALOG(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), GAL_TYPE_VIEW_NEW_DIALOG, GalViewNewDialog))
-#define GAL_VIEW_NEW_DIALOG_CLASS(cls) \
- (G_TYPE_CHECK_CLASS_CAST \
- ((cls), GAL_TYPE_VIEW_NEW_DIALOG, GalViewNewDialogClass))
-#define GAL_IS_VIEW_NEW_DIALOG(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), GAL_TYPE_VIEW_NEW_DIALOG))
-#define GAL_IS_VIEW_NEW_DIALOG_CLASS(cls) \
- (G_TYPE_CHECK_CLASS_TYPE \
- ((cls), GAL_TYPE_VIEW_NEW_DIALOG))
-#define GAL_VIEW_NEW_DIALOG_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), GAL_TYPE_VIEW_NEW_DIALOG, GalViewNewDialogClass))
-
-G_BEGIN_DECLS
-
-typedef struct _GalViewNewDialog GalViewNewDialog;
-typedef struct _GalViewNewDialogClass GalViewNewDialogClass;
-
-struct _GalViewNewDialog {
- GtkDialog parent;
-
- /* item specific fields */
- GtkBuilder *builder;
-
- GalViewCollection *collection;
- GalViewFactory *selected_factory;
-
- GtkListStore *list_store;
-
- GtkWidget *entry;
- GtkWidget *list;
-};
-
-struct _GalViewNewDialogClass {
- GtkDialogClass parent_class;
-};
-
-GType gal_view_new_dialog_get_type (void) G_GNUC_CONST;
-GtkWidget * gal_view_new_dialog_new (GalViewCollection *collection);
-GtkWidget * gal_view_new_dialog_construct (GalViewNewDialog *dialog,
- GalViewCollection *collection);
-
-G_END_DECLS
-
-#endif /* GAL_VIEW_NEW_DIALOG_H */
diff --git a/e-util/gal-view-new-dialog.ui b/e-util/gal-view-new-dialog.ui
deleted file mode 100644
index 227e3954d8..0000000000
--- a/e-util/gal-view-new-dialog.ui
+++ /dev/null
@@ -1,177 +0,0 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
-<interface>
- <object class="GtkDialog" id="dialog1">
- <property name="title" translatable="yes"/>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <child>
- <object class="GtkButton" id="button1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="button3">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- <child>
- <object class="GtkTable" id="table-top">
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">1</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Name of new view:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-name</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="entry-name">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"/>
- <property name="has_frame">True</property>
- <property name="activates_default">False</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Type of view:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
- <child>
- <object class="GtkTreeView" id="list-type-list">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- <accessibility>
-
- </accessibility>
- <child internal-child="accessible">
- <object class="AtkObject" id="a11y-list-type-list1">
- <property name="AtkObject::accessible_name" translatable="yes">Type of View</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="0">button1</action-widget>
- <action-widget response="0">button3</action-widget>
- </action-widgets>
- </object>
-</interface>