[Xfce4-commits] <ristretto:master> Remove save-dialog code, not going to support that anyways

Stephan Arts stephan at xfce.org
Wed Aug 12 12:22:36 CEST 2009


Updating branch refs/heads/master
         to 61b9578d193049de5af0e74779e3d63d39d7da2c (commit)
       from 33705411c4aea2d081e723dad34116a1e701e5a1 (commit)

commit 61b9578d193049de5af0e74779e3d63d39d7da2c
Author: Stephan Arts <stephan at xfce.org>
Date:   Mon Jun 1 22:29:19 2009 +0200

    Remove save-dialog code, not going to support that anyways

 ChangeLog         |    6 ++
 src/save_dialog.c |  195 -----------------------------------------------------
 src/save_dialog.h |   65 ------------------
 3 files changed, 6 insertions(+), 260 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 96691e5..37808a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2009-06-01  Stephan Arts <stephan at xfce.org>
 
+	* src/save_dialog.c
+	  src/save_dialog.h: Remove save-dialog code not going to support that
+	  anyways
+
+2009-06-01  Stephan Arts <stephan at xfce.org>
+
 	* src/image_list.h
 	  src/image_list.c
 	  src/thumbnail_bar.c: Expose compare_func, and use it in the thumbnailbar
diff --git a/src/save_dialog.c b/src/save_dialog.c
deleted file mode 100644
index 5dc3f0e..0000000
--- a/src/save_dialog.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- *  Copyright (C) Stephan Arts 2008 <stephan at xfce.org>
- *
- *  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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-#include <gtk/gtk.h>
-
-#include <thunar-vfs/thunar-vfs.h>
-
-#include <libexif/exif-data.h>
-
-#include "image_list.h"
-#include "save_dialog.h"
-
-static void
-cb_rstto_save_row_toggled (GtkCellRendererToggle *cell, gchar *path, gpointer user_data);
-
-static void
-rstto_save_dialog_init(RsttoSaveDialog *);
-static void
-rstto_save_dialog_class_init(RsttoSaveDialogClass *);
-
-static GtkWidgetClass *parent_class = NULL;
-
-GType
-rstto_save_dialog_get_type ()
-{
-    static GType rstto_save_dialog_type = 0;
-
-    if (!rstto_save_dialog_type)
-    {
-        static const GTypeInfo rstto_save_dialog_info = 
-        {
-            sizeof (RsttoSaveDialogClass),
-            (GBaseInitFunc) NULL,
-            (GBaseFinalizeFunc) NULL,
-            (GClassInitFunc) rstto_save_dialog_class_init,
-            (GClassFinalizeFunc) NULL,
-            NULL,
-            sizeof (RsttoSaveDialog),
-            0,
-            (GInstanceInitFunc) rstto_save_dialog_init,
-            NULL
-        };
-
-        rstto_save_dialog_type = g_type_register_static (GTK_TYPE_DIALOG, "RsttoSaveDialog", &rstto_save_dialog_info, 0);
-    }
-    return rstto_save_dialog_type;
-}
-
-static void
-rstto_save_dialog_init(RsttoSaveDialog *dialog)
-{
-    GtkTreeViewColumn *column = NULL;
-    GtkCellRenderer *renderer;
-    GtkListStore *store;
-    GtkWidget *treeview, *s_window;
-
-    store = gtk_list_store_new (4, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
-    treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL(store));
-
-    renderer = gtk_cell_renderer_pixbuf_new();
-    column = gtk_tree_view_column_new_with_attributes ( "", renderer, "pixbuf", 0, NULL);
-    gtk_tree_view_insert_column (GTK_TREE_VIEW(treeview), column, -1);
-
-    renderer = gtk_cell_renderer_text_new();
-    g_object_set (renderer, "ellipsize", PANGO_ELLIPSIZE_MIDDLE, NULL);
-    column = gtk_tree_view_column_new_with_attributes ( _("Filename"), renderer, "text", 1, NULL);
-    gtk_tree_view_column_set_expand (column, TRUE);
-    gtk_tree_view_insert_column (GTK_TREE_VIEW(treeview), column, -1);
-
-    renderer = gtk_cell_renderer_toggle_new();
-    g_object_set (renderer, "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL);
-    g_signal_connect (renderer, "toggled", (GCallback)cb_rstto_save_row_toggled, store);
-
-    column = gtk_tree_view_column_new_with_attributes ( _("Save"), renderer, "active", 2, NULL);
-    gtk_tree_view_insert_column (GTK_TREE_VIEW(treeview), column, -1);
-
-    s_window = gtk_scrolled_window_new (NULL, NULL);
-    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (s_window), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
-    gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (s_window), treeview);
-
-    gtk_container_add (GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), s_window);
-    gtk_widget_show_all (s_window);
-
-
-    gtk_dialog_add_buttons (GTK_DIALOG (dialog),
-        GTK_STOCK_CANCEL,
-        GTK_RESPONSE_CANCEL,
-        GTK_STOCK_SAVE,
-        GTK_RESPONSE_OK,
-        NULL);
-}
-
-static void
-rstto_save_dialog_class_init(RsttoSaveDialogClass *dialog_class)
-{
-    GObjectClass *object_class = (GObjectClass*)dialog_class;
-    parent_class = g_type_class_peek_parent(dialog_class);
-}
-
-GtkWidget *
-rstto_save_dialog_new (GtkWindow *parent, GList *entries)
-{
-    GtkWidget *dialog = g_object_new (RSTTO_TYPE_SAVE_DIALOG, NULL);
-    gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
-
-    return dialog;
-}
-
-
-/*
-GtkWidget *
-rstto_save_dialog_new (GtkWindow *parent, GList *entries)
-{
-    GtkTreeIter iter;
-    GtkTreeViewColumn *column = NULL;
-    GList *list_iter = entries;
-    GtkCellRenderer *renderer;
-    GtkListStore *store;
-    GtkWidget *treeview, *s_window;
-    GtkWidget *dialog = gtk_dialog_new_with_buttons (
-                                _("Save images"),
-                                parent,
-                                GTK_DIALOG_DESTROY_WITH_PARENT,
-                                GTK_STOCK_CANCEL,
-                                GTK_RESPONSE_CANCEL,
-                                GTK_STOCK_SAVE,
-                                GTK_RESPONSE_OK,
-                                NULL);
-
-    store = gtk_list_store_new (4, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
-    treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL(store));
-
-    renderer = gtk_cell_renderer_pixbuf_new();
-    column = gtk_tree_view_column_new_with_attributes ( "", renderer, "pixbuf", 0, NULL);
-    gtk_tree_view_insert_column (GTK_TREE_VIEW(treeview), column, -1);
-
-    renderer = gtk_cell_renderer_text_new();
-    g_object_set (renderer, "ellipsize", PANGO_ELLIPSIZE_MIDDLE, NULL);
-    column = gtk_tree_view_column_new_with_attributes ( _("Filename"), renderer, "text", 1, NULL);
-    gtk_tree_view_column_set_expand (column, TRUE);
-    gtk_tree_view_insert_column (GTK_TREE_VIEW(treeview), column, -1);
-
-    renderer = gtk_cell_renderer_toggle_new();
-    g_object_set (renderer, "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL);
-    g_signal_connect (renderer, "toggled", (GCallback)cb_rstto_save_row_toggled, store);
-
-    column = gtk_tree_view_column_new_with_attributes ( _("Save"), renderer, "active", 2, NULL);
-    gtk_tree_view_insert_column (GTK_TREE_VIEW(treeview), column, -1);
-
-    while (list_iter)
-    {
-        gtk_list_store_append (store, &iter);
-        gchar *path = thunar_vfs_path_dup_string (rstto_image_list_entry_get_info(((RsttoImageListEntry *)list_iter->data))->path);
-        gtk_list_store_set (store, &iter, 0,rstto_image_list_entry_get_thumb (entries->data, 48),1, path, 2, FALSE, -1);
-        g_free (path);
-
-        list_iter = g_list_next(list_iter);
-    }
-
-
-    s_window = gtk_scrolled_window_new (NULL, NULL);
-    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (s_window), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
-    gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (s_window), treeview);
-
-    gtk_container_add (GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), s_window);
-    gtk_widget_show_all (s_window);
-    return dialog;
-}
-*/
-
-static void
-cb_rstto_save_row_toggled (GtkCellRendererToggle *cell, gchar *path, gpointer user_data)
-{
-    GtkTreeModel *model = GTK_TREE_MODEL(user_data);
-    GtkTreeIter iter;
-
-    gtk_tree_model_get_iter_from_string (model, &iter, path);
-    gtk_list_store_set (GTK_LIST_STORE(model), &iter, 2, !gtk_cell_renderer_toggle_get_active (cell), -1);
-};
diff --git a/src/save_dialog.h b/src/save_dialog.h
deleted file mode 100644
index 44d4a5f..0000000
--- a/src/save_dialog.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *  Copyright (C) Stephan Arts 2008 <stephan at xfce.org>
- *
- *  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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef __RISTRETTO_SAVE_DIALOG_H__
-#define __RISTRETTO_SAVE_DIALOG_H__
-
-G_BEGIN_DECLS
-
-#define RSTTO_TYPE_SAVE_DIALOG rstto_save_dialog_get_type()
-
-#define RSTTO_SAVE_DIALOG(obj)( \
-        G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-                RSTTO_TYPE_SAVE_DIALOG, \
-                RsttoSaveDialog))
-
-#define RSTTO_IS_SAVE_DIALOG(obj)( \
-        G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
-                RSTTO_TYPE_SAVE_DIALOG))
-
-#define RSTTO_SAVE_DIALOG_CLASS(klass)( \
-        G_TYPE_CHECK_CLASS_CAST ((klass), \
-                RSTTO_TYPE_SAVE_DIALOG, \
-                RsttoSaveDialogClass))
-
-#define RSTTO_IS_SAVE_DIALOG_CLASS(klass)( \
-        G_TYPE_CHECK_CLASS_TYPE ((klass), \
-                RSTTO_TYPE_SAVE_DIALOG()))
-
-typedef struct _RsttoSaveDialog RsttoSaveDialog;
-
-struct _RsttoSaveDialog
-{
-    GtkDialog         parent;
-};
-
-typedef struct _RsttoSaveDialogClass RsttoSaveDialogClass;
-
-struct _RsttoSaveDialogClass
-{
-    GtkDialogClass  parent_class;
-};
-
-GType      rstto_save_dialog_get_type();
-
-GtkWidget *
-rstto_save_dialog_new (GtkWindow *parent, GList *entries);
-
-G_END_DECLS
-
-#endif /* __RISTRETTO_SAVE_DIALOG_H__ */



More information about the Xfce4-commits mailing list