Ejemplo n.º 1
0
static void
brasero_tool_dialog_response (GtkDialog *dialog,
			      GtkResponseType response,
			      gpointer NULL_data)
{
	if (response == GTK_RESPONSE_CANCEL) {
		if (!brasero_tool_dialog_cancel (BRASERO_TOOL_DIALOG (dialog)))
			g_signal_stop_emission_by_name (dialog, "response");
	}
	else if (response == GTK_RESPONSE_OK) {
		if (!brasero_tool_dialog_run (BRASERO_TOOL_DIALOG (dialog)))
			g_signal_stop_emission_by_name (dialog, "response");
	}
}
Ejemplo n.º 2
0
static void
tool_dialog_run (BraseroToolDialog	*dialog,
		 GtkWindow		*toplevel,
		 NautilusMenuItem	*item)
{
	char			*device_path;
	BraseroDrive		*drive;
	BraseroMediumMonitor	*monitor;

	device_path = g_object_get_data (G_OBJECT (item), "drive_device_path");
	if (!device_path) {
		g_warning ("Drive device path not specified");
		return;
	}

	monitor = brasero_medium_monitor_get_default ();
	drive = brasero_medium_monitor_get_drive (monitor, device_path);
	g_object_unref (monitor);

	if (drive) {
		brasero_tool_dialog_set_medium (BRASERO_TOOL_DIALOG (dialog),
						brasero_drive_get_medium (drive));
		g_object_unref (drive);
	}

	/* Get the icon for the window */
	if (toplevel)
		gtk_window_set_icon_name (GTK_WINDOW (dialog), gtk_window_get_icon_name (toplevel));
	else
		gtk_window_set_icon_name (GTK_WINDOW (dialog), "brasero");

	gtk_dialog_run (GTK_DIALOG (dialog));
	gtk_widget_destroy (GTK_WIDGET (dialog));
}
Ejemplo n.º 3
0
static gboolean
brasero_tool_dialog_delete (GtkWidget *widget, GdkEventAny *event)
{
	BraseroToolDialog *self;

	self = BRASERO_TOOL_DIALOG (widget);

	return (brasero_tool_dialog_cancel (self) != TRUE);
}
Ejemplo n.º 4
0
static void
check_disc_activate_cb (NautilusMenuItem *item,
                        gpointer          user_data)
{
	BraseroSumDialog *dialog;

	ensure_initialized ();

	dialog = brasero_sum_dialog_new ();
	tool_dialog_run (BRASERO_TOOL_DIALOG (dialog),
			 GTK_WINDOW (user_data),
			 item);
}