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> 2002-01-03 Andy Hertzfeld <andy@differnet.com>
reviewed by: <darin@bentspoon.com> reviewed by: <darin@bentspoon.com>
......
...@@ -3,6 +3,7 @@ NULL= ...@@ -3,6 +3,7 @@ NULL=
SUBDIRS = \ SUBDIRS = \
history \ history \
image-viewer \ image-viewer \
music \
news \ news \
notes \ notes \
sample \ sample \
...@@ -14,6 +15,5 @@ XXX= ...@@ -14,6 +15,5 @@ XXX=
adapter \ adapter \
hardware \ hardware \
loser \ loser \
music \
text \ text \
$(NULL) $(NULL)
This diff is collapsed.
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
a program from a list a program from a list
Copyright (C) 2000 Eazel, Inc. 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 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 modify it under the terms of the GNU Library General Public License as
...@@ -20,7 +21,8 @@ ...@@ -20,7 +21,8 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. 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 #ifndef NAUTILUS_PROGRAM_CHOOSER_H
...@@ -32,11 +34,33 @@ ...@@ -32,11 +34,33 @@
#include "nautilus-file.h" #include "nautilus-file.h"
#include "nautilus-view-identifier.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); NautilusFile *file);
GnomeVFSMimeApplication *nautilus_program_chooser_get_application (GtkDialog *program_chooser); GnomeVFSMimeApplication *nautilus_program_chooser_get_application (NautilusProgramChooser *program_chooser);
NautilusViewIdentifier *nautilus_program_chooser_get_component (GtkDialog *program_chooser); NautilusViewIdentifier *nautilus_program_chooser_get_component (NautilusProgramChooser *program_chooser);
void nautilus_program_chooser_show_no_choices_message (GnomeVFSMimeActionType action_type, void nautilus_program_chooser_show_no_choices_message (GnomeVFSMimeActionType action_type,
NautilusFile *file, NautilusFile *file,
......
...@@ -137,12 +137,12 @@ choose_component_destroy (ChooseComponentCallbackData *choose_data) ...@@ -137,12 +137,12 @@ choose_component_destroy (ChooseComponentCallbackData *choose_data)
* *
* Return value: The program-choosing dialog, ready to be run. * Return value: The program-choosing dialog, ready to be run.
*/ */
static GtkDialog * static GtkWidget *
set_up_program_chooser (NautilusFile *file, set_up_program_chooser (NautilusFile *file,
GnomeVFSMimeActionType type, GnomeVFSMimeActionType type,
GtkWindow *parent) GtkWindow *parent)
{ {
GtkDialog *dialog; GtkWidget *dialog;
g_assert (NAUTILUS_IS_FILE (file)); g_assert (NAUTILUS_IS_FILE (file));
...@@ -172,7 +172,7 @@ choose_component_callback (NautilusFile *file, ...@@ -172,7 +172,7 @@ choose_component_callback (NautilusFile *file,
{ {
ChooseComponentCallbackData *choose_data; ChooseComponentCallbackData *choose_data;
NautilusViewIdentifier *identifier; NautilusViewIdentifier *identifier;
GtkDialog *dialog; GtkWidget *dialog;
choose_data = callback_data; choose_data = callback_data;
...@@ -191,8 +191,8 @@ choose_component_callback (NautilusFile *file, ...@@ -191,8 +191,8 @@ choose_component_callback (NautilusFile *file,
if (nautilus_mime_has_any_components_for_file (file)) { if (nautilus_mime_has_any_components_for_file (file)) {
dialog = set_up_program_chooser (file, GNOME_VFS_MIME_ACTION_TYPE_COMPONENT, dialog = set_up_program_chooser (file, GNOME_VFS_MIME_ACTION_TYPE_COMPONENT,
choose_data->parent_window); choose_data->parent_window);
if (gtk_dialog_run (dialog) == GTK_RESPONSE_OK) { if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
identifier = nautilus_program_chooser_get_component (dialog); identifier = nautilus_program_chooser_get_component (NAUTILUS_PROGRAM_CHOOSER (dialog));
} }
} else { } else {
nautilus_program_chooser_show_no_choices_message (GNOME_VFS_MIME_ACTION_TYPE_COMPONENT, nautilus_program_chooser_show_no_choices_message (GNOME_VFS_MIME_ACTION_TYPE_COMPONENT,
...@@ -311,7 +311,7 @@ choose_application_callback (NautilusFile *file, ...@@ -311,7 +311,7 @@ choose_application_callback (NautilusFile *file,
gpointer callback_data) gpointer callback_data)
{ {
ChooseApplicationCallbackData *choose_data; ChooseApplicationCallbackData *choose_data;
GtkDialog *dialog; GtkWidget *dialog;
GnomeVFSMimeApplication *application; GnomeVFSMimeApplication *application;
choose_data = callback_data; choose_data = callback_data;
...@@ -331,8 +331,8 @@ choose_application_callback (NautilusFile *file, ...@@ -331,8 +331,8 @@ choose_application_callback (NautilusFile *file,
if (nautilus_mime_has_any_applications_for_file_type (file)) { if (nautilus_mime_has_any_applications_for_file_type (file)) {
dialog = set_up_program_chooser (file, GNOME_VFS_MIME_ACTION_TYPE_APPLICATION, dialog = set_up_program_chooser (file, GNOME_VFS_MIME_ACTION_TYPE_APPLICATION,
choose_data->parent_window); choose_data->parent_window);
if (gtk_dialog_run (dialog) == GTK_RESPONSE_OK) { if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
application = nautilus_program_chooser_get_application (dialog); application = nautilus_program_chooser_get_application (NAUTILUS_PROGRAM_CHOOSER (dialog));
} }
} else { } else {
nautilus_program_chooser_show_no_choices_message (GNOME_VFS_MIME_ACTION_TYPE_APPLICATION, 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