[Goodies-commits] r5031 - xfburn/trunk/xfburn
David Mohr
squisher at xfce.org
Mon Jul 7 22:20:57 CEST 2008
Author: squisher
Date: 2008-07-07 20:20:56 +0000 (Mon, 07 Jul 2008)
New Revision: 5031
Modified:
xfburn/trunk/xfburn/xfburn-data-composition.c
xfburn/trunk/xfburn/xfburn-main.c
Log:
Adding cli option to open the blank dialog
Modified: xfburn/trunk/xfburn/xfburn-data-composition.c
===================================================================
--- xfburn/trunk/xfburn/xfburn-data-composition.c 2008-07-07 17:34:27 UTC (rev 5030)
+++ xfburn/trunk/xfburn/xfburn-data-composition.c 2008-07-07 20:20:56 UTC (rev 5031)
@@ -1463,6 +1463,7 @@
xfburn_busy_cursor (priv->content);
+ /* move a selection inside of the composition window */
if (sd->target == gdk_atom_intern ("XFBURN_TREE_PATHS", FALSE)) {
GList *row = NULL, *selected_rows = NULL;
GtkTreeIter *iter = NULL;
@@ -1590,6 +1591,7 @@
gtk_widget_hide (priv->progress);
xfburn_default_cursor (priv->content);
}
+ /* drag from the file selector */
else if (sd->target == gdk_atom_intern ("text/plain", FALSE)) {
ThreadAddFilesDragParams *params;
const gchar *file = NULL;
@@ -1630,6 +1632,7 @@
gtk_drag_finish (dc, TRUE, FALSE, t);
} else {
+ g_warning ("Trying to receive an unsupported drag target, this should not happen.");
gtk_drag_finish (dc, FALSE, FALSE, t);
xfburn_default_cursor (priv->content);
}
Modified: xfburn/trunk/xfburn/xfburn-main.c
===================================================================
--- xfburn/trunk/xfburn/xfburn-main.c 2008-07-07 17:34:27 UTC (rev 5030)
+++ xfburn/trunk/xfburn/xfburn-main.c 2008-07-07 20:20:56 UTC (rev 5031)
@@ -43,6 +43,7 @@
#include "xfburn-stock.h"
#include "xfburn-burn-image-dialog.h"
#include "xfburn-main-window.h"
+#include "xfburn-blank-dialog.h"
/* internal prototypes */
@@ -55,16 +56,19 @@
static gboolean other_action = FALSE;
static gboolean show_main = FALSE;
static gboolean add_data_composition = FALSE;
+static gboolean blank = FALSE;
static GOptionEntry optionentries[] = {
{ "burn-image", 'i', G_OPTION_FLAG_OPTIONAL_ARG /* || G_OPTION_FLAG_FILENAME */, G_OPTION_ARG_CALLBACK, &parse_option,
"Open the burn image dialog. The filename of the image can optionally be specified as a parameter", NULL },
+ { "blank", 'b', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, &parse_option,
+ "Open the blank disc dialog.", NULL },
{ "data-composition", 'd', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, &parse_option,
"Start a data composition. Optionally followed by files/directories to be added to the composition.", NULL },
{ "version", 'V', G_OPTION_FLAG_NO_ARG , G_OPTION_ARG_NONE, &show_version,
"Display program version and exit", NULL },
{ "main", 'm', G_OPTION_FLAG_NO_ARG , G_OPTION_ARG_NONE, &show_main,
- "Show main program even when other action is specified on the command line", NULL },
+ "Show main program even when other action is specified on the command line.", NULL },
{ NULL },
};
@@ -78,6 +82,8 @@
image_filename = g_strdup(value);
} else if (strcmp (option_name, "-d") == 0 || strcmp (option_name, "--data-composition") == 0) {
add_data_composition = TRUE;
+ } else if (strcmp (option_name, "-b") == 0 || strcmp (option_name, "--blank") == 0) {
+ blank = TRUE;
} else {
g_set_error (error, 0, G_OPTION_ERROR_FAILED, "Invalid command line option. Please report, this is a bug.");
return FALSE;
@@ -146,6 +152,7 @@
gtk_widget_destroy (GTK_WIDGET (dialog));
}
+
/* evaluate parsed command line options */
if (image_filename != NULL) {
@@ -170,8 +177,15 @@
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
+ } else if (blank) {
+ GtkWidget *dialog = xfburn_blank_dialog_new ();
+
+ other_action = TRUE;
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
}
+
/* main window */
if (!other_action || show_main) {
mainwin = xfburn_main_window_new ();
More information about the Goodies-commits
mailing list