summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Hertzfeld <andy@src.gnome.org>2001-03-28 08:47:43 +0000
committerAndy Hertzfeld <andy@src.gnome.org>2001-03-28 08:47:43 +0000
commit936984af21ad577b0a8549d239b7e8e3c1c3f1cf (patch)
tree8565ad9623d8e3036161508ac8644e92a5f23b5b
parent949cd4f16064f8a7215a384573f1a1cea0e17083 (diff)
downloadnautilus-936984af21ad577b0a8549d239b7e8e3c1c3f1cf.tar.gz
changed it to be a subclass of gnome_dialog, and added buttons
* src/file-manager/fm-annotation-window.c: (create_annotation_window): * src/file-manager/fm-annotation-window.h: changed it to be a subclass of gnome_dialog, and added buttons
-rw-r--r--ChangeLog7
-rw-r--r--src/file-manager/fm-annotation-window.c21
-rw-r--r--src/file-manager/fm-annotation-window.h5
3 files changed, 22 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 9351497e3..20b61c48a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-03-28 Andy Hertzfeld <andy@eazel.com>
+
+ * src/file-manager/fm-annotation-window.c:
+ (create_annotation_window):
+ * src/file-manager/fm-annotation-window.h:
+ changed it to be a subclass of gnome_dialog, and added buttons
+
2001-03-27 Andy Hertzfeld <andy@eazel.com>
diff --git a/src/file-manager/fm-annotation-window.c b/src/file-manager/fm-annotation-window.c
index d7ab1622d..5ecd12853 100644
--- a/src/file-manager/fm-annotation-window.c
+++ b/src/file-manager/fm-annotation-window.c
@@ -84,7 +84,7 @@ static FMAnnotationWindow* create_annotation_window
(NautilusFile *file,
FMDirectoryView *directroy_view);
-NAUTILUS_DEFINE_CLASS_BOILERPLATE (FMAnnotationWindow, fm_annotation_window, GTK_TYPE_WINDOW)
+NAUTILUS_DEFINE_CLASS_BOILERPLATE (FMAnnotationWindow, fm_annotation_window, GNOME_TYPE_DIALOG)
static void
fm_annotation_window_initialize_class (FMAnnotationWindowClass *class)
@@ -252,7 +252,8 @@ static FMAnnotationWindow *
create_annotation_window (NautilusFile *file, FMDirectoryView *directory_view)
{
FMAnnotationWindow *window;
- GtkWidget *hbox, *content_box;
+ GtkWidget *hbox;
+ GtkBox *content_box;
GtkWidget *label;
GtkWidget *table;
char *file_name, *title;
@@ -266,10 +267,12 @@ create_annotation_window (NautilusFile *file, FMDirectoryView *directory_view)
gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, FALSE);
gtk_window_set_wmclass (GTK_WINDOW (window), "file_annotation", "Nautilus");
- /* allocate a vbox to hold the contents of the annotation window */
- content_box = gtk_vbox_new (FALSE, GNOME_PAD);
- gtk_container_add (GTK_CONTAINER (window), content_box);
-
+ /* add the buttons */
+ gnome_dialog_append_buttons (GNOME_DIALOG (window), GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL);
+
+ /* get the container box of the dialog */
+ content_box = GTK_BOX (GNOME_DIALOG (window)->vbox);
+
/* allocate an hbox to hold the icon and the title */
hbox = gtk_hbox_new (FALSE, GNOME_PAD);
gtk_box_pack_start (GTK_BOX (content_box), hbox, FALSE, FALSE, GNOME_PAD);
@@ -294,9 +297,9 @@ create_annotation_window (NautilusFile *file, FMDirectoryView *directory_view)
/* at first, there is only one hardwired type, so just add it here */
window->details->text_field = gtk_text_new (NULL, NULL);
- font = nautilus_font_factory_get_font_from_preferences (12);
- nautilus_gtk_widget_set_font (window->details->text_field, font);
- gdk_font_unref (font);
+ font = nautilus_font_factory_get_font_from_preferences (12);
+ nautilus_gtk_widget_set_font (window->details->text_field, font);
+ gdk_font_unref (font);
gtk_text_set_editable (GTK_TEXT (window->details->text_field), TRUE);
gtk_box_pack_start (GTK_BOX (content_box), window->details->text_field, TRUE, TRUE, 0);
diff --git a/src/file-manager/fm-annotation-window.h b/src/file-manager/fm-annotation-window.h
index 47ca8e87f..6b96195bc 100644
--- a/src/file-manager/fm-annotation-window.h
+++ b/src/file-manager/fm-annotation-window.h
@@ -29,6 +29,7 @@
#include "fm-directory-view.h"
#include <gtk/gtkwindow.h>
+#include <libgnomeui/gnome-dialog.h>
#include <libnautilus-extensions/nautilus-file.h>
typedef struct FMAnnotationWindow FMAnnotationWindow;
@@ -47,12 +48,12 @@ typedef struct FMAnnotationWindow FMAnnotationWindow;
typedef struct FMAnnotationWindowDetails FMAnnotationWindowDetails;
struct FMAnnotationWindow {
- GtkWindow window;
+ GnomeDialog dialog;
FMAnnotationWindowDetails *details;
};
struct FMAnnotationWindowClass {
- GtkWindowClass parent_class;
+ GnomeDialogClass parent_class;
};
typedef struct FMAnnotationWindowClass FMAnnotationWindowClass;