Commit 995efcdf authored by Anders Carlsson's avatar Anders Carlsson Committed by Anders Carlsson

Update to matched changed return value from nautilus_program_chooser_new

2002-01-04  Anders Carlsson  <andersca@gnu.org>

	* libnautilus-private/nautilus-program-choosing.c:
	Update to matched changed return value from
	nautilus_program_chooser_new ().

	* libnautilus-private/nautilus-program-chooser.h:
	* libnautilus-private/nautilus-program-chooser.c:
	Port to GtkTreeView, and make NautilusProgramChooser
	into a real object.

	* components/Makefile.am: Re-enable the music
	view.

	* components/music/nautilus-music-view.c: Port to
	GtkTreeView and GNOME2.
parent eaca3673
2002-01-04 Anders Carlsson <andersca@gnu.org>
* libnautilus-private/nautilus-program-choosing.c:
Update to matched changed return value from
nautilus_program_chooser_new ().
* libnautilus-private/nautilus-program-chooser.h:
* libnautilus-private/nautilus-program-chooser.c:
Port to GtkTreeView, and make NautilusProgramChooser
into a real object.
* components/Makefile.am: Re-enable the music
view.
* components/music/nautilus-music-view.c: Port to
GtkTreeView and GNOME2.
2002-01-03 Andy Hertzfeld <andy@differnet.com>
reviewed by: <darin@bentspoon.com>
......
......@@ -3,6 +3,7 @@ NULL=
SUBDIRS = \
history \
image-viewer \
music \
news \
notes \
sample \
......@@ -14,6 +15,5 @@ XXX=
adapter \
hardware \
loser \
music \
text \
$(NULL)
This diff is collapsed.
......@@ -4,6 +4,7 @@
a program from a list
Copyright (C) 2000 Eazel, Inc.
Copyright (C) 2001, 2002 Anders Carlsson <andersca@gnu.org>
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
......@@ -20,7 +21,8 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: John Sullivan <sullivan@eazel.com>
Authors: John Sullivan <sullivan@eazel.com>
Anders Carlsson <andersca@gnu.org>
*/
#ifndef NAUTILUS_PROGRAM_CHOOSER_H
......@@ -32,11 +34,33 @@
#include "nautilus-file.h"
#include "nautilus-view-identifier.h"
GtkDialog *nautilus_program_chooser_new (GnomeVFSMimeActionType type,
#define NAUTILUS_TYPE_PROGRAM_CHOOSER (nautilus_program_chooser_get_type ())
#define NAUTILUS_PROGRAM_CHOOSER(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_PROGRAM_CHOOSER, NautilusProgramChooser))
#define NAUTILUS_PROGRAM_CHOOSER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_PROGRAM_CHOOSER, NautilusProgramChooserClass))
#define NAUTILUS_IS_PROGRAM_CHOOSER(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_PROGRAM_CHOOSER))
typedef struct NautilusProgramChooser NautilusProgramChooser;
typedef struct NautilusProgramChooserClass NautilusProgramChooserClass;
typedef struct NautilusProgramChooserDetails NautilusProgramChooserDetails;
struct NautilusProgramChooser
{
GtkDialog parent_instance;
NautilusProgramChooserDetails *details;
};
struct NautilusProgramChooserClass
{
GtkDialogClass parent_class;
};
GtkType nautilus_program_chooser_get_type (void);
GtkWidget *nautilus_program_chooser_new (GnomeVFSMimeActionType type,
NautilusFile *file);
GnomeVFSMimeApplication *nautilus_program_chooser_get_application (GtkDialog *program_chooser);
NautilusViewIdentifier *nautilus_program_chooser_get_component (GtkDialog *program_chooser);
GnomeVFSMimeApplication *nautilus_program_chooser_get_application (NautilusProgramChooser *program_chooser);
NautilusViewIdentifier *nautilus_program_chooser_get_component (NautilusProgramChooser *program_chooser);
void nautilus_program_chooser_show_no_choices_message (GnomeVFSMimeActionType action_type,
NautilusFile *file,
......
......@@ -137,12 +137,12 @@ choose_component_destroy (ChooseComponentCallbackData *choose_data)
*
* Return value: The program-choosing dialog, ready to be run.
*/
static GtkDialog *
static GtkWidget *
set_up_program_chooser (NautilusFile *file,
GnomeVFSMimeActionType type,
GtkWindow *parent)
{
GtkDialog *dialog;
GtkWidget *dialog;
g_assert (NAUTILUS_IS_FILE (file));
......@@ -172,7 +172,7 @@ choose_component_callback (NautilusFile *file,
{
ChooseComponentCallbackData *choose_data;
NautilusViewIdentifier *identifier;
GtkDialog *dialog;
GtkWidget *dialog;
choose_data = callback_data;
......@@ -191,8 +191,8 @@ choose_component_callback (NautilusFile *file,
if (nautilus_mime_has_any_components_for_file (file)) {
dialog = set_up_program_chooser (file, GNOME_VFS_MIME_ACTION_TYPE_COMPONENT,
choose_data->parent_window);
if (gtk_dialog_run (dialog) == GTK_RESPONSE_OK) {
identifier = nautilus_program_chooser_get_component (dialog);
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
identifier = nautilus_program_chooser_get_component (NAUTILUS_PROGRAM_CHOOSER (dialog));
}
} else {
nautilus_program_chooser_show_no_choices_message (GNOME_VFS_MIME_ACTION_TYPE_COMPONENT,
......@@ -311,7 +311,7 @@ choose_application_callback (NautilusFile *file,
gpointer callback_data)
{
ChooseApplicationCallbackData *choose_data;
GtkDialog *dialog;
GtkWidget *dialog;
GnomeVFSMimeApplication *application;
choose_data = callback_data;
......@@ -331,8 +331,8 @@ choose_application_callback (NautilusFile *file,
if (nautilus_mime_has_any_applications_for_file_type (file)) {
dialog = set_up_program_chooser (file, GNOME_VFS_MIME_ACTION_TYPE_APPLICATION,
choose_data->parent_window);
if (gtk_dialog_run (dialog) == GTK_RESPONSE_OK) {
application = nautilus_program_chooser_get_application (dialog);
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
application = nautilus_program_chooser_get_application (NAUTILUS_PROGRAM_CHOOSER (dialog));
}
} else {
nautilus_program_chooser_show_no_choices_message (GNOME_VFS_MIME_ACTION_TYPE_APPLICATION,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment