? nautilus-cd-burner-2.17.2.tar.gz
Index: data/nautilus-cd-burner.glade
===================================================================
RCS file: /cvs/gnome/nautilus-cd-burner/data/nautilus-cd-burner.glade,v
retrieving revision 1.1
diff -p -u -r1.1 nautilus-cd-burner.glade
--- data/nautilus-cd-burner.glade	8 May 2006 17:07:10 -0000	1.1
+++ data/nautilus-cd-burner.glade	4 Dec 2006 17:18:09 -0000
@@ -190,7 +190,7 @@
   </child>
 </widget>
 
-<widget class="GtkWindow" id="window1">
+<widget class="GtkWindow" id="selection_window">
   <property name="visible">True</property>
   <property name="title" translatable="yes">window1</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
@@ -614,6 +614,157 @@
 	<packing>
 	  <property name="padding">0</property>
 	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="rename_window">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">window1</property>
+  <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_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="rename_dialog_vbox">
+      <property name="border_width">6</property>
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkHBox" id="hbox7">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">12</property>
+
+	  <child>
+	    <widget class="GtkImage" id="image1">
+	      <property name="visible">True</property>
+	      <property name="icon_size">6</property>
+	      <property name="icon_name">gtk-dialog-warning</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox14">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">12</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label19">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">&lt;big&gt;&lt;b&gt;Some files have invalid filenames&lt;/b&gt;&lt;/big&gt;</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">True</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</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="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label20">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">The following filenames are not valid.  Please provide new names for each of them.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">True</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow2">
+		  <property name="width_request">150</property>
+		  <property name="height_request">150</property>
+		  <property name="visible">True</property>
+		  <property name="can_focus">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>
+		    <widget class="GtkTreeView" id="rename_dialog_treeview">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="headers_visible">True</property>
+		      <property name="rules_hint">False</property>
+		      <property name="reorderable">False</property>
+		      <property name="enable_search">True</property>
+		      <property name="fixed_height_mode">False</property>
+		      <property name="hover_selection">False</property>
+		      <property name="hover_expand">False</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
 	  <property name="fill">True</property>
 	</packing>
       </child>
Index: src/ncb-rename-dialog.c
===================================================================
RCS file: /cvs/gnome/nautilus-cd-burner/src/ncb-rename-dialog.c,v
retrieving revision 1.1
diff -p -u -r1.1 ncb-rename-dialog.c
--- src/ncb-rename-dialog.c	4 Dec 2006 16:15:33 -0000	1.1
+++ src/ncb-rename-dialog.c	4 Dec 2006 17:18:09 -0000
@@ -51,9 +51,11 @@ typedef struct NcbRenameDialogInvalidFil
 
 struct NcbRenameDialogPrivate
 {
+	GladeXML        *xml;
+
 	/* View and model for the list
 	 * of files */
-	GtkTreeView	*view;
+	GtkWidget	*view;
 	GtkListStore	*store;
 
 	/* Contextual popup menu */
@@ -74,14 +76,14 @@ enum {
 	NCB_TREESTORE_NEWNAME
 };
 
-G_DEFINE_TYPE (NcbRenameDialog, ncb_rename_dialog, GTK_TYPE_MESSAGE_DIALOG)
+G_DEFINE_TYPE (NcbRenameDialog, ncb_rename_dialog, GTK_TYPE_DIALOG)
 
 static void
 ncb_rename_dialog_class_init (NcbRenameDialogClass *klass)
 {
 	GObjectClass   *object_class = G_OBJECT_CLASS (klass);
 
-	object_class->finalize     = ncb_rename_dialog_finalize;
+	object_class->finalize = ncb_rename_dialog_finalize;
 
 	g_type_class_add_private (klass, sizeof (NcbRenameDialogPrivate));
 }
@@ -221,7 +223,7 @@ rename_menu_item_cb (GtkWidget *widget,
 
 	store = GTK_LIST_STORE (dialog->priv->store);
 
-	selection = gtk_tree_view_get_selection (dialog->priv->view);
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->priv->view));
 
 	list = gtk_tree_selection_get_selected_rows (selection, NULL);
 	if (g_list_length (list) != 1) {
@@ -233,11 +235,11 @@ rename_menu_item_cb (GtkWidget *widget,
 
 	path = (GtkTreePath *) list->data;
 
-	column = gtk_tree_view_get_column (dialog->priv->view, 0);
+	column = gtk_tree_view_get_column (GTK_TREE_VIEW (dialog->priv->view), 0);
 	g_assert (column != NULL);
 
 	/* Start editing the cell */
-	gtk_tree_view_set_cursor (dialog->priv->view,
+	gtk_tree_view_set_cursor (GTK_TREE_VIEW (dialog->priv->view),
 				  path, column, TRUE);
 
 	g_list_foreach (list, (GFunc)gtk_tree_path_free, NULL);
@@ -267,7 +269,7 @@ delete_menu_item_cb (GtkWidget *widget,
 
 	model = GTK_TREE_MODEL (dialog->priv->store);
 
-	selection = gtk_tree_view_get_selection (dialog->priv->view);
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->priv->view));
 
 	list = gtk_tree_selection_get_selected_rows (selection, NULL);
 
@@ -423,50 +425,48 @@ treeview_popup_menu_cb (GtkWidget	*widge
 static void
 ncb_rename_dialog_init (NcbRenameDialog *dialog)
 {
-	GtkListStore		*store;
-	GtkWidget		*view;
-	GtkWidget		*scrolled;
+	GtkWidget		*vbox;
+	GtkWidget		*button;
 	GtkTreeSelection	*selection;
 	GtkCellRenderer		*renderer;
 	GtkCellRenderer		*pixbuf_renderer;
 	GtkTreeViewColumn	*newname;
-	GtkWidget		*menu;
+
 	GtkWidget		*rename_item;
 	GtkWidget		*delete_item;
-	char			*primary_markup;
 
 	dialog->priv = NCB_RENAME_DIALOG_GET_PRIVATE (dialog);
 
 	gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
+        gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+	gtk_window_set_title (GTK_WINDOW (dialog), "");
+	gtk_window_set_icon_name (GTK_WINDOW (dialog), "nautilus-cd-burner");
+
+	dialog->priv->xml = glade_xml_new (DATADIR "/nautilus-cd-burner.glade", "rename_dialog_vbox", NULL);
+
+	vbox = glade_xml_get_widget (dialog->priv->xml, "rename_dialog_vbox");
+        gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+                            vbox,
+                            TRUE, TRUE, 0);
+        gtk_widget_show_all (vbox);
 
-	/** Set primary and secondary labels **/
-	primary_markup = g_strdup_printf ("<span size='larger' weight='bold'>%s</span>",
-					  _("Some files have invalid filenames"));
-	gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog),
-				       primary_markup);
-	g_free (primary_markup);
-
-	gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
-						  _("The following filenames can't be used, click to "
-						    "rename them:"));
-
-	/** Set message type and buttons **/
-	g_object_set (G_OBJECT (dialog),
-		      "message-type", GTK_MESSAGE_WARNING,
-		      "buttons", GTK_BUTTONS_OK_CANCEL,
-		       NULL);
+	gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+	button = gtk_dialog_add_button (GTK_DIALOG (dialog), _("C_ontinue"), GTK_RESPONSE_OK);
 	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_BUTTONS_CANCEL);
 
-	/** Set list store and tree view **/
-	store = gtk_list_store_new (3, G_TYPE_OBJECT, G_TYPE_STRING, G_TYPE_STRING);
-	view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
-	g_signal_connect (G_OBJECT (view), "button-press-event",
-			  (GCallback) treeview_button_pressed_cb, dialog);
-	g_signal_connect (G_OBJECT (view), "popup-menu",
-			  (GCallback) treeview_popup_menu_cb, dialog);
+	/* Set list store and tree view */
+	dialog->priv->store = gtk_list_store_new (3, G_TYPE_OBJECT, G_TYPE_STRING, G_TYPE_STRING);
+
+	dialog->priv->view = glade_xml_get_widget (dialog->priv->xml, "rename_dialog_treeview");
+	gtk_tree_view_set_model (GTK_TREE_VIEW (dialog->priv->view), GTK_TREE_MODEL (dialog->priv->store));
+
+	g_signal_connect (dialog->priv->view, "button-press-event",
+			  G_CALLBACK (treeview_button_pressed_cb), dialog);
+	g_signal_connect (dialog->priv->view, "popup-menu",
+			  G_CALLBACK (treeview_popup_menu_cb), dialog);
 
 	/* Setup selection mode */
-	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->priv->view));
 	gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
 
 	/* Icon renderer */
@@ -474,10 +474,8 @@ ncb_rename_dialog_init (NcbRenameDialog 
 
 	/* Filename renderer */
 	renderer = gtk_cell_renderer_text_new ();
-	g_object_set (G_OBJECT (renderer), "editable", TRUE,
-		      NULL);
-	g_signal_connect (G_OBJECT (renderer), "edited",
-			  (GCallback) cell_editing_done_cb, dialog);
+	g_object_set (G_OBJECT (renderer), "editable", TRUE, NULL);
+	g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (cell_editing_done_cb), dialog);
 
 	/* Column */
 	newname = gtk_tree_view_column_new ();
@@ -491,44 +489,25 @@ ncb_rename_dialog_init (NcbRenameDialog 
 					     "text", NCB_TREESTORE_NEWNAME, NULL);
 
 	/* Append column to the view */
-	gtk_tree_view_append_column (GTK_TREE_VIEW (view), newname);
-
-	/** Scrolled window **/
-	scrolled = gtk_scrolled_window_new (NULL, NULL);
-	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
-					GTK_POLICY_AUTOMATIC,
-					GTK_POLICY_AUTOMATIC);
-	gtk_container_add (GTK_CONTAINER (scrolled), view);
-
-	/* Set scrolled window's size */
-	gtk_widget_set_size_request (scrolled, -1, 150);
-	gtk_container_set_border_width (GTK_CONTAINER (scrolled), 7);
+	gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->priv->view), newname);
 
-	gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog)->vbox),
-				     scrolled);
 
 	/** Set popup menu **/
-	menu = gtk_menu_new ();
+	dialog->priv->menu = gtk_menu_new ();
 
 	rename_item = gtk_menu_item_new_with_label (_("Rename file"));
 	g_signal_connect (rename_item, "activate",
-			  (GCallback) rename_menu_item_cb, dialog);
+			  G_CALLBACK (rename_menu_item_cb), dialog);
 
 	delete_item = gtk_image_menu_item_new_from_stock (GTK_STOCK_REMOVE,
 							  gtk_accel_group_new ());
 	g_signal_connect (delete_item, "activate",
-			  (GCallback) delete_menu_item_cb, dialog);
+			  G_CALLBACK (delete_menu_item_cb), dialog);
 
-	gtk_menu_shell_append (GTK_MENU_SHELL (menu), rename_item);
-	gtk_menu_shell_append (GTK_MENU_SHELL (menu), delete_item);
+	gtk_menu_shell_append (GTK_MENU_SHELL (dialog->priv->menu), rename_item);
+	gtk_menu_shell_append (GTK_MENU_SHELL (dialog->priv->menu), delete_item);
 
-	dialog->priv->store = store;
-	dialog->priv->view = GTK_TREE_VIEW (view);
-	dialog->priv->menu = menu;
 	dialog->priv->rename_item = rename_item;
-
-	gtk_window_set_title (GTK_WINDOW (dialog), "");
-	gtk_window_set_icon_name (GTK_WINDOW (dialog), "nautilus-cd-burner");
 
 	gtk_widget_show_all (GTK_WIDGET (GTK_DIALOG (dialog)->vbox));
 }
Index: src/ncb-rename-dialog.h
===================================================================
RCS file: /cvs/gnome/nautilus-cd-burner/src/ncb-rename-dialog.h,v
retrieving revision 1.1
diff -p -u -r1.1 ncb-rename-dialog.h
--- src/ncb-rename-dialog.h	4 Dec 2006 16:15:33 -0000	1.1
+++ src/ncb-rename-dialog.h	4 Dec 2006 17:18:09 -0000
@@ -43,13 +43,13 @@ typedef struct NcbRenameDialogClass     
 typedef struct NcbRenameDialogPrivate            NcbRenameDialogPrivate;
 
 struct NcbRenameDialog {
-	GtkMessageDialog	 parent;
+	GtkDialog	         parent;
 
 	NcbRenameDialogPrivate  *priv;
 };
 
 struct NcbRenameDialogClass {
-	GtkMessageDialogClass parent_class;
+	GtkDialogClass parent_class;
 };
 
 GType			  ncb_rename_dialog_get_type			(void);
