?? disk_dialog.c,v
字號:
head 1.1;
access;
symbols;
locks
cbbrowne:1.1; strict;
comment @ * @;
1.1
date 2000.06.09.03.39.32; author cbbrowne; state Exp;
branches;
next ;
desc
@@
1.1
log
@Initial revision
@
text
@/*
* disk_dialog.c
* Contains code to handle creating a new disk
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gnome.h>
#include "interface.h"
#include "support.h"
#include "dvd.h"
#include "misc.h"
#include "dvd_gui.h"
void
do_new_disk_dialog()
{
static GtkWidget* new_disk_dialog = NULL;
if (new_disk_dialog != NULL)
{
/* Try to raise and de-iconify dialog
*/
gdk_window_show(new_disk_dialog->window);
gdk_window_raise(new_disk_dialog->window);
}
else
{
/* Call the glade created function to create
* the dialog and connect callbacks
*/
new_disk_dialog = create_disk_dialog ();
gtk_signal_connect(GTK_OBJECT(new_disk_dialog),
"destroy",
GTK_SIGNAL_FUNC(gtk_widget_destroyed),
&new_disk_dialog);
gnome_dialog_set_parent(GNOME_DIALOG(new_disk_dialog),
GTK_WINDOW(main_window));
gnome_dialog_set_close(GNOME_DIALOG(new_disk_dialog),
TRUE);
/* Call the glade created function to create
* the dialog and connect callbacks
*/
gtk_widget_show (new_disk_dialog);
}
}
void
on_disk_dialog_clicked (GnomeDialog *gnomedialog,
gint arg1,
gpointer user_data)
{
GtkWidget *message_box;
gint disk_id = 0;
gint result;
gchar *msg;
dvd_disk new_disk;
if (arg1 == GNOME_OK)
{
new_disk.title_id = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON
(lookup_widget
(GTK_WIDGET(gnomedialog),
"titleid_spinbutton")));
result = dvd_disk_create(&new_disk, &disk_id);
if (result != DVD_SUCCESS)
{
dvd_gui_show_result("dvd_disk_create", result);
return;
}
dvd_gui_show_result("dvd_disk_get", dvd_disk_get(disk_id, &new_disk));
msg = g_strdup_printf(_("Created Disk ID %d for Title ID %d"),
new_disk.disk_id,
new_disk.title_id);
message_box = gnome_message_box_new (msg, GNOME_MESSAGE_BOX_INFO,
GNOME_STOCK_BUTTON_OK,
NULL);
gtk_widget_show(message_box);
add_log_message(msg);
g_free(msg);
}
}
@
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -