brasero r1123 - in trunk: . src
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1123 - in trunk: . src
- Date: Tue, 19 Aug 2008 12:59:52 +0000 (UTC)
Author: philippr
Date: Tue Aug 19 12:59:52 2008
New Revision: 1123
URL: http://svn.gnome.org/viewvc/brasero?rev=1123&view=rev
Log:
Close #548098 â Add dialog missing add button
* src/brasero-project.c (brasero_project_file_chooser_response_cb),
(brasero_project_add_uris_cb):
Modified:
trunk/ChangeLog
trunk/src/brasero-project.c
Modified: trunk/src/brasero-project.c
==============================================================================
--- trunk/src/brasero-project.c (original)
+++ trunk/src/brasero-project.c Tue Aug 19 12:59:52 2008
@@ -262,6 +262,8 @@
#define BRASERO_PROJECT_VERSION "0.2"
+#define BRASERO_RESPONSE_ADD 1976
+
GType
brasero_project_get_type ()
{
@@ -1452,7 +1454,7 @@
GSList *uris;
GSList *iter;
- if (response != GTK_RESPONSE_OK) {
+ if (response != BRASERO_RESPONSE_ADD) {
gtk_widget_destroy (chooser);
return;
}
@@ -1501,12 +1503,16 @@
return;
}
+ /* Just for the record, file chooser creation uses all GtkResponseType
+ * that are already defined for internal use like GTK_RESPONSE_OK,
+ * *_APPLY and so on (usually to open directories, not add them). So we
+ * have to define on custom here. */
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (project));
project->priv->chooser = gtk_file_chooser_dialog_new (_("Select Files"),
GTK_WINDOW (toplevel),
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_ADD, GTK_RESPONSE_OK,
+ GTK_STOCK_ADD, BRASERO_RESPONSE_ADD,
NULL);
gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (project->priv->chooser), TRUE);
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (project->priv->chooser), TRUE);
@@ -1514,6 +1520,12 @@
brasero_file_chooser_customize (project->priv->chooser, NULL);
gtk_widget_show (project->priv->chooser);
+ /* This is to work around a bug in GTK+ which doesn't want to add "Add"
+ * button or anything that is not "Open" or "Cancel" buttons */
+/* gtk_dialog_add_button (GTK_DIALOG (project->priv->chooser),
+ GTK_STOCK_ADD,
+ 666);
+*/
g_signal_connect (project->priv->chooser,
"file-activated",
G_CALLBACK (brasero_project_file_chooser_activated_cb),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]