/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include <config.h> #endif #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <string.h> #include <gnome.h> #include "gnome_callbacks.h" #include "gnome_interface.h" #include "gnome_support.h" static GnomeUIInfo menubar_file_menu_uiinfo[] = { { GNOME_APP_UI_ITEM, N_("_Open File..."), N_("Open a File"), (gpointer) on_menubar_open_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Open _Disc..."), N_("Open a DVD or VCD"), (gpointer) on_menubar_disc_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_CDROM, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("_Network Stream..."), N_("Select a Network Stream"), (gpointer) on_menubar_network_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_REFRESH, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_MENU_EXIT_ITEM (on_menubar_exit_activate, NULL), GNOMEUIINFO_END }; static GnomeUIInfo menubar_view_menu_uiinfo[] = { { GNOME_APP_UI_ITEM, N_("_Title"), NULL, (gpointer) NULL, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("_Chapter"), NULL, (gpointer) NULL, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_SEPARATOR, { GNOME_APP_UI_ITEM, N_("_Playlist..."), N_("Open the playlist window"), (gpointer) on_menubar_playlist_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_INDEX, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("_Modules..."), N_("Open the plugin manager"), (gpointer) on_menubar_modules_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_ATTACH, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_END }; static GnomeUIInfo menubar_settings_menu_uiinfo[] = { { GNOME_APP_UI_ITEM, N_("_Audio"), N_("Select audio channel"), (gpointer) NULL, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("_Subtitle"), N_("Select subtitle unit"), (gpointer) NULL, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_MENU_PREFERENCES_ITEM (on_menubar_preferences_activate, NULL), GNOMEUIINFO_END }; static GnomeUIInfo menubar_help_menu_uiinfo[] = { GNOMEUIINFO_MENU_ABOUT_ITEM (on_menubar_about_activate, NULL), GNOMEUIINFO_END }; static GnomeUIInfo menubar_uiinfo[] = { GNOMEUIINFO_MENU_FILE_TREE (menubar_file_menu_uiinfo), GNOMEUIINFO_MENU_VIEW_TREE (menubar_view_menu_uiinfo), GNOMEUIINFO_MENU_SETTINGS_TREE (menubar_settings_menu_uiinfo), GNOMEUIINFO_MENU_HELP_TREE (menubar_help_menu_uiinfo), GNOMEUIINFO_END }; GtkWidget* create_intf_window (void) { GtkWidget *intf_window; GtkWidget *dockitem; GtkWidget *toolbar; GtkWidget *tmp_toolbar_icon; GtkWidget *toolbar_file; GtkWidget *toolbar_disc; GtkWidget *toolbar_network; GtkWidget *toolbar_back; GtkWidget *toolbar_stop; GtkWidget *toolbar_play; GtkWidget *toolbar_pause; GtkWidget *toolbar_slow; GtkWidget *toolbar_fast; GtkWidget *toolbar_playlist; GtkWidget *toolbar_prev; GtkWidget *toolbar_next; GtkWidget *vbox2; GtkWidget *hbox4; GtkWidget *label_date; GtkWidget *label_status; GtkWidget *label_bar; GtkWidget *slider; GtkWidget *file_box; GtkWidget *label_file; GtkWidget *dvd_box; GtkWidget *title_chapter_box; GtkWidget *label19; GtkWidget *label_title; GtkWidget *button_title_prev; GtkWidget *button_title_next; GtkWidget *dvd_chapter_box; GtkWidget *label20; GtkWidget *label_chapter; GtkWidget *button_chapter_prev; GtkWidget *button_chapter_next; GtkWidget *network_box; GtkWidget *label_network; GtkWidget *button_network_channel_1; GtkWidget *button_network_channel_2; GtkWidget *button_network_channel_3; GtkWidget *button_network_channel_4; GtkWidget *button_network_channel_5; GtkWidget *button_network_channel_6; GtkWidget *appbar; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); intf_window = gnome_app_new ("VideoLAN Client", _("VideoLAN Client")); gtk_object_set_data (GTK_OBJECT (intf_window), "intf_window", intf_window); dockitem = GNOME_APP (intf_window)->dock; gtk_widget_ref (dockitem); gtk_object_set_data_full (GTK_OBJECT (intf_window), "dockitem", dockitem, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (dockitem); gnome_app_create_menus (GNOME_APP (intf_window), menubar_uiinfo); gtk_widget_ref (menubar_uiinfo[0].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_file", menubar_uiinfo[0].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (menubar_file_menu_uiinfo[0].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_open", menubar_file_menu_uiinfo[0].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (menubar_file_menu_uiinfo[1].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_disc", menubar_file_menu_uiinfo[1].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (menubar_file_menu_uiinfo[2].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_network", menubar_file_menu_uiinfo[2].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (menubar_file_menu_uiinfo[3].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "separator1", menubar_file_menu_uiinfo[3].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (menubar_file_menu_uiinfo[4].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_exit", menubar_file_menu_uiinfo[4].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (menubar_uiinfo[1].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_view", menubar_uiinfo[1].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (menubar_view_menu_uiinfo[0].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_title", menubar_view_menu_uiinfo[0].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_set_sensitive (menubar_view_menu_uiinfo[0].widget, FALSE); gtk_widget_ref (menubar_view_menu_uiinfo[1].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_chapter", menubar_view_menu_uiinfo[1].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_set_sensitive (menubar_view_menu_uiinfo[1].widget, FALSE); gtk_widget_ref (menubar_view_menu_uiinfo[2].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "separator7", menubar_view_menu_uiinfo[2].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (menubar_view_menu_uiinfo[3].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_playlist", menubar_view_menu_uiinfo[3].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_set_sensitive (menubar_view_menu_uiinfo[3].widget, FALSE); gtk_widget_ref (menubar_view_menu_uiinfo[4].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_modules", menubar_view_menu_uiinfo[4].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_set_sensitive (menubar_view_menu_uiinfo[4].widget, FALSE); gtk_widget_ref (menubar_uiinfo[2].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_settings", menubar_uiinfo[2].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (menubar_settings_menu_uiinfo[0].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_audio", menubar_settings_menu_uiinfo[0].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_set_sensitive (menubar_settings_menu_uiinfo[0].widget, FALSE); gtk_widget_ref (menubar_settings_menu_uiinfo[1].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_subtitle", menubar_settings_menu_uiinfo[1].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_set_sensitive (menubar_settings_menu_uiinfo[1].widget, FALSE); gtk_widget_ref (menubar_settings_menu_uiinfo[2].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "separator5", menubar_settings_menu_uiinfo[2].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (menubar_settings_menu_uiinfo[3].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_preferences", menubar_settings_menu_uiinfo[3].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_set_sensitive (menubar_settings_menu_uiinfo[3].widget, FALSE); gtk_widget_ref (menubar_uiinfo[3].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_help", menubar_uiinfo[3].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (menubar_help_menu_uiinfo[0].widget); gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_about", menubar_help_menu_uiinfo[0].widget, (GtkDestroyNotify) gtk_widget_unref); toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH); gtk_widget_ref (toolbar); gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar", toolbar, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar); gnome_app_add_toolbar (GNOME_APP (intf_window), GTK_TOOLBAR (toolbar), "toolbar", GNOME_DOCK_ITEM_BEH_EXCLUSIVE, GNOME_DOCK_TOP, 1, 0, 2); gtk_toolbar_set_space_size (GTK_TOOLBAR (toolbar), 16); gtk_toolbar_set_space_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_SPACE_LINE); gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NONE); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_OPEN); toolbar_file = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Open"), _("Open a File"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (toolbar_file); gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_file", toolbar_file, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar_file); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_CDROM); toolbar_disc = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Disc"), _("Open a DVD or VCD"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (toolbar_disc); gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_disc", toolbar_disc, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar_disc); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_REFRESH); toolbar_network = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Net"), _("Select a Network Stream"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (toolbar_network); gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_network", toolbar_network, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar_network); gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_BACK); toolbar_back = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Back"), _("Go Backwards"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (toolbar_back); gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_back", toolbar_back, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar_back); gtk_widget_set_sensitive (toolbar_back, FALSE); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_STOP); toolbar_stop = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Stop"), _("Stop Stream"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (toolbar_stop); gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_stop", toolbar_stop, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar_stop); gtk_widget_set_sensitive (toolbar_stop, FALSE); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_FORWARD); toolbar_play = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Play"), _("Play Stream"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (toolbar_play); gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_play", toolbar_play, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar_play); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_BOTTOM); toolbar_pause = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Pause"), _("Pause Stream"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (toolbar_pause); gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_pause", toolbar_pause, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar_pause); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_TIMER_STOP); toolbar_slow = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Slow"), _("Play Slower"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (toolbar_slow); gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_slow", toolbar_slow, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar_slow); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_TIMER); toolbar_fast = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Fast"), _("Play Faster"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (toolbar_fast); gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_fast", toolbar_fast, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar_fast); gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_INDEX); toolbar_playlist = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Playlist"), _("Open Playlist"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (toolbar_playlist); gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_playlist", toolbar_playlist, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar_playlist); gtk_widget_set_sensitive (toolbar_playlist, FALSE); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_FIRST); toolbar_prev = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Prev"), _("Previous File"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (toolbar_prev); gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_prev", toolbar_prev, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar_prev); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_LAST); toolbar_next = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Next"), _("Next File"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (toolbar_next); gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_next", toolbar_next, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar_next); vbox2 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox2); gtk_object_set_data_full (GTK_OBJECT (intf_window), "vbox2", vbox2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox2); gnome_app_set_contents (GNOME_APP (intf_window), vbox2); hbox4 = gtk_hbox_new (TRUE, 0); gtk_widget_ref (hbox4); gtk_object_set_data_full (GTK_OBJECT (intf_window), "hbox4", hbox4, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox4); gtk_box_pack_start (GTK_BOX (vbox2), hbox4, TRUE, TRUE, 0); label_date = gtk_label_new (_("-:--:--")); gtk_widget_ref (label_date); gtk_object_set_data_full (GTK_OBJECT (intf_window), "label_date", label_date, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label_date); gtk_box_pack_start (GTK_BOX (hbox4), label_date, FALSE, FALSE, 0); label_status = gtk_label_new (_("Status: foo")); gtk_widget_ref (label_status); gtk_object_set_data_full (GTK_OBJECT (intf_window), "label_status", label_status, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label_status); gtk_box_pack_start (GTK_BOX (hbox4), label_status, FALSE, FALSE, 0); label_bar = gtk_label_new (_("Bar: baz")); gtk_widget_ref (label_bar); gtk_object_set_data_full (GTK_OBJECT (intf_window), "label_bar", label_bar, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label_bar); gtk_box_pack_start (GTK_BOX (hbox4), label_bar, FALSE, FALSE, 0); slider = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 1, 6.25, 0))); gtk_widget_ref (slider); gtk_object_set_data_full (GTK_OBJECT (intf_window), "slider", slider, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (slider); gtk_box_pack_start (GTK_BOX (vbox2), slider, TRUE, TRUE, 0); gtk_scale_set_draw_value (GTK_SCALE (slider), FALSE); gtk_scale_set_digits (GTK_SCALE (slider), 3); file_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (file_box); gtk_object_set_data_full (GTK_OBJECT (intf_window), "file_box", file_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (file_box); gtk_box_pack_start (GTK_BOX (vbox2), file_box, TRUE, TRUE, 0); label_file = gtk_label_new (_("Vlc File Mode")); gtk_widget_ref (label_file); gtk_object_set_data_full (GTK_OBJECT (intf_window), "label_file", label_file, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label_file); gtk_box_pack_start (GTK_BOX (file_box), label_file, TRUE, TRUE, 0); gtk_widget_set_usize (label_file, -2, 24); dvd_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (dvd_box); gtk_object_set_data_full (GTK_OBJECT (intf_window), "dvd_box", dvd_box, (GtkDestroyNotify) gtk_widget_unref); gtk_box_pack_start (GTK_BOX (vbox2), dvd_box, TRUE, TRUE, 0); gtk_widget_set_usize (dvd_box, -2, 24); title_chapter_box = gtk_hbox_new (FALSE, 10); gtk_widget_ref (title_chapter_box); gtk_object_set_data_full (GTK_OBJECT (intf_window), "title_chapter_box", title_chapter_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (title_chapter_box); gtk_box_pack_start (GTK_BOX (dvd_box), title_chapter_box, TRUE, FALSE, 0); label19 = gtk_label_new (_("Title:")); gtk_widget_ref (label19); gtk_object_set_data_full (GTK_OBJECT (intf_window), "label19", label19, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label19); gtk_box_pack_start (GTK_BOX (title_chapter_box), label19, FALSE, FALSE, 0); label_title = gtk_label_new (_("--")); gtk_widget_ref (label_title); gtk_object_set_data_full (GTK_OBJECT (intf_window), "label_title", label_title, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label_title); gtk_box_pack_start (GTK_BOX (title_chapter_box), label_title, FALSE, FALSE, 0); button_title_prev = gnome_stock_button (GNOME_STOCK_BUTTON_PREV); gtk_widget_ref (button_title_prev); gtk_object_set_data_full (GTK_OBJECT (intf_window), "button_title_prev", button_title_prev, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_title_prev); gtk_box_pack_start (GTK_BOX (title_chapter_box), button_title_prev, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, button_title_prev, _("Select previous title"), NULL); gtk_button_set_relief (GTK_BUTTON (button_title_prev), GTK_RELIEF_NONE); button_title_next = gnome_stock_button (GNOME_STOCK_BUTTON_NEXT); gtk_widget_ref (button_title_next); gtk_object_set_data_full (GTK_OBJECT (intf_window), "button_title_next", button_title_next, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_title_next); gtk_box_pack_start (GTK_BOX (title_chapter_box), button_title_next, FALSE, FALSE, 0); gtk_button_set_relief (GTK_BUTTON (button_title_next), GTK_RELIEF_NONE); dvd_chapter_box = gtk_hbox_new (FALSE, 10); gtk_widget_ref (dvd_chapter_box); gtk_object_set_data_full (GTK_OBJECT (intf_window), "dvd_chapter_box", dvd_chapter_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (dvd_chapter_box); gtk_box_pack_start (GTK_BOX (dvd_box), dvd_chapter_box, TRUE, FALSE, 0); label20 = gtk_label_new (_("Chapter:")); gtk_widget_ref (label20); gtk_object_set_data_full (GTK_OBJECT (intf_window), "label20", label20, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label20); gtk_box_pack_start (GTK_BOX (dvd_chapter_box), label20, FALSE, FALSE, 0); label_chapter = gtk_label_new (_("--")); gtk_widget_ref (label_chapter); gtk_object_set_data_full (GTK_OBJECT (intf_window), "label_chapter", label_chapter, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label_chapter); gtk_box_pack_start (GTK_BOX (dvd_chapter_box), label_chapter, FALSE, FALSE, 0); button_chapter_prev = gnome_stock_button (GNOME_STOCK_BUTTON_PREV); gtk_widget_ref (button_chapter_prev); gtk_object_set_data_full (GTK_OBJECT (intf_window), "button_chapter_prev", button_chapter_prev, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_chapter_prev); gtk_box_pack_start (GTK_BOX (dvd_chapter_box), button_chapter_prev, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, button_chapter_prev, _("Select previous chapter"), NULL); gtk_button_set_relief (GTK_BUTTON (button_chapter_prev), GTK_RELIEF_NONE); button_chapter_next = gnome_stock_button (GNOME_STOCK_BUTTON_NEXT); gtk_widget_ref (button_chapter_next); gtk_object_set_data_full (GTK_OBJECT (intf_window), "button_chapter_next", button_chapter_next, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_chapter_next); gtk_box_pack_start (GTK_BOX (dvd_chapter_box), button_chapter_next, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, button_chapter_next, _("Select next chapter"), NULL); gtk_button_set_relief (GTK_BUTTON (button_chapter_next), GTK_RELIEF_NONE); network_box = gtk_hbox_new (FALSE, 0); gtk_widget_ref (network_box); gtk_object_set_data_full (GTK_OBJECT (intf_window), "network_box", network_box, (GtkDestroyNotify) gtk_widget_unref); gtk_box_pack_start (GTK_BOX (vbox2), network_box, TRUE, TRUE, 0); gtk_widget_set_usize (network_box, -2, 24); label_network = gtk_label_new (_("Network Channel:")); gtk_widget_ref (label_network); gtk_object_set_data_full (GTK_OBJECT (intf_window), "label_network", label_network, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label_network); gtk_box_pack_start (GTK_BOX (network_box), label_network, TRUE, FALSE, 0); button_network_channel_1 = gtk_toggle_button_new_with_label (_("Channel 1")); gtk_widget_ref (button_network_channel_1); gtk_object_set_data_full (GTK_OBJECT (intf_window), "button_network_channel_1", button_network_channel_1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_network_channel_1); gtk_box_pack_start (GTK_BOX (network_box), button_network_channel_1, FALSE, TRUE, 2); gtk_button_set_relief (GTK_BUTTON (button_network_channel_1), GTK_RELIEF_HALF); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button_network_channel_1), TRUE); button_network_channel_2 = gtk_toggle_button_new_with_label (_("Channel 2")); gtk_widget_ref (button_network_channel_2); gtk_object_set_data_full (GTK_OBJECT (intf_window), "button_network_channel_2", button_network_channel_2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_network_channel_2); gtk_box_pack_start (GTK_BOX (network_box), button_network_channel_2, FALSE, TRUE, 2); gtk_widget_set_sensitive (button_network_channel_2, FALSE); gtk_button_set_relief (GTK_BUTTON (button_network_channel_2), GTK_RELIEF_HALF); button_network_channel_3 = gtk_toggle_button_new_with_label (_("Channel 3")); gtk_widget_ref (button_network_channel_3); gtk_object_set_data_full (GTK_OBJECT (intf_window), "button_network_channel_3", button_network_channel_3, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_network_channel_3); gtk_box_pack_start (GTK_BOX (network_box), button_network_channel_3, FALSE, TRUE, 2); gtk_widget_set_sensitive (button_network_channel_3, FALSE); gtk_button_set_relief (GTK_BUTTON (button_network_channel_3), GTK_RELIEF_HALF); button_network_channel_4 = gtk_toggle_button_new_with_label (_("Channel 4")); gtk_widget_ref (button_network_channel_4); gtk_object_set_data_full (GTK_OBJECT (intf_window), "button_network_channel_4", button_network_channel_4, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_network_channel_4); gtk_box_pack_start (GTK_BOX (network_box), button_network_channel_4, FALSE, TRUE, 2); gtk_widget_set_sensitive (button_network_channel_4, FALSE); gtk_button_set_relief (GTK_BUTTON (button_network_channel_4), GTK_RELIEF_HALF); button_network_channel_5 = gtk_toggle_button_new_with_label (_("Channel 5")); gtk_widget_ref (button_network_channel_5); gtk_object_set_data_full (GTK_OBJECT (intf_window), "button_network_channel_5", button_network_channel_5, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_network_channel_5); gtk_box_pack_start (GTK_BOX (network_box), button_network_channel_5, FALSE, TRUE, 2); gtk_widget_set_sensitive (button_network_channel_5, FALSE); gtk_button_set_relief (GTK_BUTTON (button_network_channel_5), GTK_RELIEF_HALF); button_network_channel_6 = gtk_toggle_button_new_with_label (_("Channel 6")); gtk_widget_ref (button_network_channel_6); gtk_object_set_data_full (GTK_OBJECT (intf_window), "button_network_channel_6", button_network_channel_6, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_network_channel_6); gtk_box_pack_start (GTK_BOX (network_box), button_network_channel_6, FALSE, TRUE, 2); gtk_widget_set_sensitive (button_network_channel_6, FALSE); gtk_button_set_relief (GTK_BUTTON (button_network_channel_6), GTK_RELIEF_HALF); appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER); gtk_widget_ref (appbar); gtk_object_set_data_full (GTK_OBJECT (intf_window), "appbar", appbar, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (appbar); gnome_app_set_statusbar (GNOME_APP (intf_window), appbar); gtk_signal_connect (GTK_OBJECT (intf_window), "destroy", GTK_SIGNAL_FUNC (on_intf_window_destroy), NULL); gtk_signal_connect (GTK_OBJECT (intf_window), "drag_data_received", GTK_SIGNAL_FUNC (on_intf_window_drag_data_received), NULL); gnome_app_install_menu_hints (GNOME_APP (intf_window), menubar_uiinfo); gtk_signal_connect (GTK_OBJECT (toolbar_file), "clicked", GTK_SIGNAL_FUNC (on_toolbar_open_clicked), NULL); gtk_signal_connect (GTK_OBJECT (toolbar_disc), "clicked", GTK_SIGNAL_FUNC (on_toolbar_disc_clicked), NULL); gtk_signal_connect (GTK_OBJECT (toolbar_network), "clicked", GTK_SIGNAL_FUNC (on_toolbar_network_clicked), NULL); gtk_signal_connect (GTK_OBJECT (toolbar_back), "clicked", GTK_SIGNAL_FUNC (on_toolbar_back_clicked), NULL); gtk_signal_connect (GTK_OBJECT (toolbar_stop), "clicked", GTK_SIGNAL_FUNC (on_toolbar_stop_clicked), NULL); gtk_signal_connect (GTK_OBJECT (toolbar_play), "clicked", GTK_SIGNAL_FUNC (on_toolbar_play_clicked), NULL); gtk_signal_connect (GTK_OBJECT (toolbar_pause), "clicked", GTK_SIGNAL_FUNC (on_toolbar_pause_clicked), NULL); gtk_signal_connect (GTK_OBJECT (toolbar_slow), "clicked", GTK_SIGNAL_FUNC (on_toolbar_slow_clicked), NULL); gtk_signal_connect (GTK_OBJECT (toolbar_fast), "clicked", GTK_SIGNAL_FUNC (on_toolbar_fast_clicked), NULL); gtk_signal_connect (GTK_OBJECT (toolbar_playlist), "clicked", GTK_SIGNAL_FUNC (on_toolbar_playlist_clicked), NULL); gtk_signal_connect (GTK_OBJECT (toolbar_prev), "clicked", GTK_SIGNAL_FUNC (on_toolbar_prev_clicked), NULL); gtk_signal_connect (GTK_OBJECT (toolbar_next), "clicked", GTK_SIGNAL_FUNC (on_toolbar_next_clicked), NULL); gtk_signal_connect (GTK_OBJECT (slider), "button_press_event", GTK_SIGNAL_FUNC (on_slider_button_press_event), NULL); gtk_signal_connect (GTK_OBJECT (slider), "button_release_event", GTK_SIGNAL_FUNC (on_slider_button_release_event), NULL); gtk_signal_connect (GTK_OBJECT (button_title_prev), "clicked", GTK_SIGNAL_FUNC (on_button_title_prev_clicked), NULL); gtk_signal_connect (GTK_OBJECT (button_title_next), "clicked", GTK_SIGNAL_FUNC (on_button_title_next_clicked), NULL); gtk_signal_connect (GTK_OBJECT (button_chapter_prev), "clicked", GTK_SIGNAL_FUNC (on_button_chapter_prev_clicked), NULL); gtk_signal_connect (GTK_OBJECT (button_chapter_next), "clicked", GTK_SIGNAL_FUNC (on_button_chapter_next_clicked), NULL); gtk_object_set_data (GTK_OBJECT (intf_window), "tooltips", tooltips); return intf_window; } static GnomeUIInfo popup_file_menu_uiinfo[] = { { GNOME_APP_UI_ITEM, N_("_Open File..."), N_("Open a File"), (gpointer) on_popup_open_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Open _Disc..."), N_("Open a DVD or VCD"), (gpointer) on_popup_disc_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_CDROM, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("_Network Stream..."), N_("Select a Network Stream"), (gpointer) on_popup_network_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_REFRESH, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_MENU_ABOUT_ITEM (on_popup_about_activate, NULL), GNOMEUIINFO_END }; static GnomeUIInfo intf_popup_uiinfo[] = { { GNOME_APP_UI_ITEM, N_("_Play"), NULL, (gpointer) on_popup_play_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_FORWARD, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Pause"), NULL, (gpointer) on_popup_pause_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_BOTTOM, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Slow"), NULL, (gpointer) on_popup_slow_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_TIMER_STOP, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Fast"), NULL, (gpointer) on_popup_fast_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_TIMER, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_SEPARATOR, { GNOME_APP_UI_ITEM, N_("_Navigation"), N_("Navigate through titles and chapters"), (gpointer) NULL, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("_Audio"), N_("Select audio channel"), (gpointer) NULL, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("_Subtitle"), N_("Select subtitle channel"), (gpointer) NULL, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_MENU_FILE_TREE (popup_file_menu_uiinfo), GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_MENU_EXIT_ITEM (on_popup_exit_activate, NULL), GNOMEUIINFO_END }; GtkWidget* create_intf_popup (void) { GtkWidget *intf_popup; intf_popup = gtk_menu_new (); gtk_object_set_data (GTK_OBJECT (intf_popup), "intf_popup", intf_popup); gnome_app_fill_menu (GTK_MENU_SHELL (intf_popup), intf_popup_uiinfo, NULL, FALSE, 0); gtk_widget_ref (intf_popup_uiinfo[0].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_play", intf_popup_uiinfo[0].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (intf_popup_uiinfo[1].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_pause", intf_popup_uiinfo[1].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (intf_popup_uiinfo[2].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_slow", intf_popup_uiinfo[2].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (intf_popup_uiinfo[3].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_fast", intf_popup_uiinfo[3].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (intf_popup_uiinfo[4].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator3", intf_popup_uiinfo[4].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (intf_popup_uiinfo[5].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_navigation", intf_popup_uiinfo[5].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_set_sensitive (intf_popup_uiinfo[5].widget, FALSE); gtk_widget_ref (intf_popup_uiinfo[6].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio", intf_popup_uiinfo[6].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_set_sensitive (intf_popup_uiinfo[6].widget, FALSE); gtk_widget_ref (intf_popup_uiinfo[7].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_subtitle", intf_popup_uiinfo[7].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_set_sensitive (intf_popup_uiinfo[7].widget, FALSE); gtk_widget_ref (intf_popup_uiinfo[8].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_file", intf_popup_uiinfo[8].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (popup_file_menu_uiinfo[0].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_open", popup_file_menu_uiinfo[0].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (popup_file_menu_uiinfo[1].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_disc", popup_file_menu_uiinfo[1].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (popup_file_menu_uiinfo[2].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_network", popup_file_menu_uiinfo[2].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (popup_file_menu_uiinfo[3].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator4", popup_file_menu_uiinfo[3].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (popup_file_menu_uiinfo[4].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_about", popup_file_menu_uiinfo[4].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (intf_popup_uiinfo[9].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator2", intf_popup_uiinfo[9].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (intf_popup_uiinfo[10].widget); gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_exit", intf_popup_uiinfo[10].widget, (GtkDestroyNotify) gtk_widget_unref); return intf_popup; } GtkWidget* create_intf_about (void) { const gchar *authors[] = { "R�gis Duchesne <regis@via.ecp.fr>", "Michel Lespinasse <walken@zoy.org>", "Olivier Pomel <pomel@via.ecp.fr>", "Pierre Baillet <oct@zoy.org>", "Jean-Philippe Grimaldi <jeanphi@via.ecp.fr>", "Andres Krapf <dae@via.ecp.fr>", "Christophe Massiot <massiot@via.ecp.fr>", "Vincent Seguin <seguin@via.ecp.fr>", "Benoit Steiner <benny@via.ecp.fr>", "Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>", "Jean-Marc Dressler <polux@via.ecp.fr>", "Ga�l Hendryckx <jimmy@via.ecp.fr>", "Samuel Hocevar <sam@zoy.org>", "Brieuc Jeunhomme <bbp@via.ecp.fr>", "Michel Kaempf <maxx@via.ecp.fr>", "St�phane Borel <stef@via.ecp.fr>", "Renaud Dartus <reno@via.ecp.fr>", "Henri Fallon <henri@via.ecp.fr>", NULL }; GtkWidget *intf_about; intf_about = gnome_about_new ("VideoLAN Client", VERSION, _("(C) 1996, 1997, 1998, 1999, 2000, 2001 - the VideoLAN Team"), authors, _("This is the VideoLAN client, a DVD and MPEG player. It can play MPEG and MPEG 2 files from a file or from a network source."), NULL); gtk_object_set_data (GTK_OBJECT (intf_about), "intf_about", intf_about); return intf_about; } GtkWidget* create_intf_fileopen (void) { GtkWidget *intf_fileopen; GtkWidget *fileopen_ok; GtkWidget *fileopen_cancel; intf_fileopen = gtk_file_selection_new (_("Open File")); gtk_object_set_data (GTK_OBJECT (intf_fileopen), "intf_fileopen", intf_fileopen); gtk_container_set_border_width (GTK_CONTAINER (intf_fileopen), 10); gtk_window_set_modal (GTK_WINDOW (intf_fileopen), TRUE); fileopen_ok = GTK_FILE_SELECTION (intf_fileopen)->ok_button; gtk_object_set_data (GTK_OBJECT (intf_fileopen), "fileopen_ok", fileopen_ok); gtk_widget_show (fileopen_ok); GTK_WIDGET_SET_FLAGS (fileopen_ok, GTK_CAN_DEFAULT); fileopen_cancel = GTK_FILE_SELECTION (intf_fileopen)->cancel_button; gtk_object_set_data (GTK_OBJECT (intf_fileopen), "fileopen_cancel", fileopen_cancel); gtk_widget_show (fileopen_cancel); GTK_WIDGET_SET_FLAGS (fileopen_cancel, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (intf_fileopen), "destroy", GTK_SIGNAL_FUNC (on_intf_fileopen_destroy), NULL); gtk_signal_connect (GTK_OBJECT (fileopen_ok), "clicked", GTK_SIGNAL_FUNC (on_fileopen_ok_clicked), NULL); gtk_signal_connect (GTK_OBJECT (fileopen_cancel), "clicked", GTK_SIGNAL_FUNC (on_fileopen_cancel_clicked), NULL); return intf_fileopen; } GtkWidget* create_intf_modules (void) { GtkWidget *intf_modules; GtkWidget *dialog_vbox1; GtkWidget *label12; GtkWidget *dialog_action_area1; GtkWidget *modules_ok; GtkWidget *modules_apply; GtkWidget *modules_cancel; intf_modules = gnome_dialog_new (_("Modules"), NULL); gtk_object_set_data (GTK_OBJECT (intf_modules), "intf_modules", intf_modules); gtk_window_set_policy (GTK_WINDOW (intf_modules), FALSE, FALSE, FALSE); dialog_vbox1 = GNOME_DIALOG (intf_modules)->vbox; gtk_object_set_data (GTK_OBJECT (intf_modules), "dialog_vbox1", dialog_vbox1); gtk_widget_show (dialog_vbox1); label12 = gtk_label_new (_("Sorry, the module manager isn't functional yet. Please retry in a later version.")); gtk_widget_ref (label12); gtk_object_set_data_full (GTK_OBJECT (intf_modules), "label12", label12, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label12); gtk_box_pack_start (GTK_BOX (dialog_vbox1), label12, FALSE, FALSE, 0); dialog_action_area1 = GNOME_DIALOG (intf_modules)->action_area; gtk_object_set_data (GTK_OBJECT (intf_modules), "dialog_action_area1", dialog_action_area1); gtk_widget_show (dialog_action_area1); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END); gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area1), 8); gnome_dialog_append_button (GNOME_DIALOG (intf_modules), GNOME_STOCK_BUTTON_OK); modules_ok = GTK_WIDGET (g_list_last (GNOME_DIALOG (intf_modules)->buttons)->data); gtk_widget_ref (modules_ok); gtk_object_set_data_full (GTK_OBJECT (intf_modules), "modules_ok", modules_ok, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (modules_ok); GTK_WIDGET_SET_FLAGS (modules_ok, GTK_CAN_DEFAULT); gnome_dialog_append_button (GNOME_DIALOG (intf_modules), GNOME_STOCK_BUTTON_APPLY); modules_apply = GTK_WIDGET (g_list_last (GNOME_DIALOG (intf_modules)->buttons)->data); gtk_widget_ref (modules_apply); gtk_object_set_data_full (GTK_OBJECT (intf_modules), "modules_apply", modules_apply, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (modules_apply); GTK_WIDGET_SET_FLAGS (modules_apply, GTK_CAN_DEFAULT); gnome_dialog_append_button (GNOME_DIALOG (intf_modules), GNOME_STOCK_BUTTON_CANCEL); modules_cancel = GTK_WIDGET (g_list_last (GNOME_DIALOG (intf_modules)->buttons)->data); gtk_widget_ref (modules_cancel); gtk_object_set_data_full (GTK_OBJECT (intf_modules), "modules_cancel", modules_cancel, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (modules_cancel); GTK_WIDGET_SET_FLAGS (modules_cancel, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (intf_modules), "destroy", GTK_SIGNAL_FUNC (on_intf_modules_destroy), NULL); gtk_signal_connect (GTK_OBJECT (modules_ok), "clicked", GTK_SIGNAL_FUNC (on_modules_ok_clicked), NULL); gtk_signal_connect (GTK_OBJECT (modules_apply), "clicked", GTK_SIGNAL_FUNC (on_modules_apply_clicked), NULL); gtk_signal_connect (GTK_OBJECT (modules_cancel), "clicked", GTK_SIGNAL_FUNC (on_modules_cancel_clicked), NULL); return intf_modules; } GtkWidget* create_intf_playlist (void) { GtkWidget *intf_playlist; GtkWidget *dialog_vbox2; GtkWidget *label11; GtkWidget *scrolledwindow3; GtkWidget *clist2; GtkWidget *label8; GtkWidget *label9; GtkWidget *label10; GtkWidget *dialog_action_area2; GtkWidget *playlist_ok; intf_playlist = gnome_dialog_new (_("Playlist"), NULL); gtk_object_set_data (GTK_OBJECT (intf_playlist), "intf_playlist", intf_playlist); dialog_vbox2 = GNOME_DIALOG (intf_playlist)->vbox; gtk_object_set_data (GTK_OBJECT (intf_playlist), "dialog_vbox2", dialog_vbox2); gtk_widget_show (dialog_vbox2); label11 = gtk_label_new (_("Sorry, the playlist isn't functional yet. Please retry in a later version.")); gtk_widget_ref (label11); gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "label11", label11, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label11); gtk_box_pack_start (GTK_BOX (dialog_vbox2), label11, FALSE, FALSE, 0); scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_ref (scrolledwindow3); gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "scrolledwindow3", scrolledwindow3, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scrolledwindow3); gtk_box_pack_start (GTK_BOX (dialog_vbox2), scrolledwindow3, TRUE, TRUE, 0); clist2 = gtk_clist_new (3); gtk_widget_ref (clist2); gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "clist2", clist2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (clist2); gtk_container_add (GTK_CONTAINER (scrolledwindow3), clist2); gtk_clist_set_column_width (GTK_CLIST (clist2), 0, 211); gtk_clist_set_column_width (GTK_CLIST (clist2), 1, 49); gtk_clist_set_column_width (GTK_CLIST (clist2), 2, 35); gtk_clist_column_titles_hide (GTK_CLIST (clist2)); label8 = gtk_label_new (_("Name")); gtk_widget_ref (label8); gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "label8", label8, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label8); gtk_clist_set_column_widget (GTK_CLIST (clist2), 0, label8); label9 = gtk_label_new (_("Type")); gtk_widget_ref (label9); gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "label9", label9, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label9); gtk_clist_set_column_widget (GTK_CLIST (clist2), 1, label9); label10 = gtk_label_new (_("Length")); gtk_widget_ref (label10); gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "label10", label10, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label10); gtk_clist_set_column_widget (GTK_CLIST (clist2), 2, label10); dialog_action_area2 = GNOME_DIALOG (intf_playlist)->action_area; gtk_object_set_data (GTK_OBJECT (intf_playlist), "dialog_action_area2", dialog_action_area2); gtk_widget_show (dialog_action_area2); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END); gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area2), 8); gnome_dialog_append_button (GNOME_DIALOG (intf_playlist), GNOME_STOCK_BUTTON_OK); playlist_ok = GTK_WIDGET (g_list_last (GNOME_DIALOG (intf_playlist)->buttons)->data); gtk_widget_ref (playlist_ok); gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "playlist_ok", playlist_ok, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (playlist_ok); GTK_WIDGET_SET_FLAGS (playlist_ok, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (intf_playlist), "destroy", GTK_SIGNAL_FUNC (on_intf_playlist_destroy), NULL); gtk_signal_connect (GTK_OBJECT (playlist_ok), "clicked", GTK_SIGNAL_FUNC (on_playlist_ok_clicked), NULL); return intf_playlist; } GtkWidget* create_intf_disc (void) { GtkWidget *intf_disc; GtkWidget *dialog_vbox4; GtkWidget *hbox2; GtkWidget *frame1; GtkWidget *vbox4; GSList *disc_group = NULL; GtkWidget *disc_dvd; GtkWidget *disc_vcd; GtkWidget *frame2; GtkWidget *table1; GtkWidget *label15; GtkWidget *label16; GtkObject *disc_title_adj; GtkWidget *disc_title; GtkObject *disc_chapter_adj; GtkWidget *disc_chapter; GtkWidget *hbox1; GtkWidget *label14; GtkWidget *disc_name; GtkWidget *dialog_action_area4; GtkWidget *disc_ok; GtkWidget *disc_cancel; intf_disc = gnome_dialog_new (_("Open Disc"), NULL); gtk_object_set_data (GTK_OBJECT (intf_disc), "intf_disc", intf_disc); gtk_window_set_modal (GTK_WINDOW (intf_disc), TRUE); gtk_window_set_policy (GTK_WINDOW (intf_disc), FALSE, FALSE, FALSE); dialog_vbox4 = GNOME_DIALOG (intf_disc)->vbox; gtk_object_set_data (GTK_OBJECT (intf_disc), "dialog_vbox4", dialog_vbox4); gtk_widget_show (dialog_vbox4); hbox2 = gtk_hbox_new (FALSE, 5); gtk_widget_ref (hbox2); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "hbox2", hbox2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox2); gtk_box_pack_start (GTK_BOX (dialog_vbox4), hbox2, TRUE, TRUE, 0); frame1 = gtk_frame_new (_("Disc type")); gtk_widget_ref (frame1); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "frame1", frame1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (frame1); gtk_box_pack_start (GTK_BOX (hbox2), frame1, TRUE, TRUE, 0); vbox4 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox4); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "vbox4", vbox4, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox4); gtk_container_add (GTK_CONTAINER (frame1), vbox4); disc_dvd = gtk_radio_button_new_with_label (disc_group, _("DVD")); disc_group = gtk_radio_button_group (GTK_RADIO_BUTTON (disc_dvd)); gtk_widget_ref (disc_dvd); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "disc_dvd", disc_dvd, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (disc_dvd); gtk_box_pack_start (GTK_BOX (vbox4), disc_dvd, FALSE, FALSE, 0); disc_vcd = gtk_radio_button_new_with_label (disc_group, _("VCD")); disc_group = gtk_radio_button_group (GTK_RADIO_BUTTON (disc_vcd)); gtk_widget_ref (disc_vcd); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "disc_vcd", disc_vcd, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (disc_vcd); gtk_box_pack_start (GTK_BOX (vbox4), disc_vcd, FALSE, FALSE, 0); gtk_widget_set_sensitive (disc_vcd, FALSE); frame2 = gtk_frame_new (_("Starting position")); gtk_widget_ref (frame2); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "frame2", frame2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (frame2); gtk_box_pack_start (GTK_BOX (hbox2), frame2, TRUE, TRUE, 0); table1 = gtk_table_new (2, 2, FALSE); gtk_widget_ref (table1); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "table1", table1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (table1); gtk_container_add (GTK_CONTAINER (frame2), table1); gtk_container_set_border_width (GTK_CONTAINER (table1), 5); gtk_table_set_row_spacings (GTK_TABLE (table1), 5); gtk_table_set_col_spacings (GTK_TABLE (table1), 5); label15 = gtk_label_new (_("Title")); gtk_widget_ref (label15); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "label15", label15, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label15); gtk_table_attach (GTK_TABLE (table1), label15, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label15), 0, 0.5); label16 = gtk_label_new (_("Chapter")); gtk_widget_ref (label16); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "label16", label16, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label16); gtk_table_attach (GTK_TABLE (table1), label16, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label16), 0, 0.5); disc_title_adj = gtk_adjustment_new (1, 1, 65536, 1, 10, 10); disc_title = gtk_spin_button_new (GTK_ADJUSTMENT (disc_title_adj), 1, 0); gtk_widget_ref (disc_title); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "disc_title", disc_title, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (disc_title); gtk_table_attach (GTK_TABLE (table1), disc_title, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); disc_chapter_adj = gtk_adjustment_new (1, 1, 65536, 1, 10, 10); disc_chapter = gtk_spin_button_new (GTK_ADJUSTMENT (disc_chapter_adj), 1, 0); gtk_widget_ref (disc_chapter); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "disc_chapter", disc_chapter, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (disc_chapter); gtk_table_attach (GTK_TABLE (table1), disc_chapter, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); hbox1 = gtk_hbox_new (FALSE, 5); gtk_widget_ref (hbox1); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "hbox1", hbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (dialog_vbox4), hbox1, TRUE, TRUE, 0); label14 = gtk_label_new (_("Device name:")); gtk_widget_ref (label14); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "label14", label14, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label14); gtk_box_pack_start (GTK_BOX (hbox1), label14, FALSE, FALSE, 0); disc_name = gtk_entry_new (); gtk_widget_ref (disc_name); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "disc_name", disc_name, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (disc_name); gtk_box_pack_start (GTK_BOX (hbox1), disc_name, TRUE, TRUE, 0); gtk_entry_set_text (GTK_ENTRY (disc_name), _("/dev/dvd")); dialog_action_area4 = GNOME_DIALOG (intf_disc)->action_area; gtk_object_set_data (GTK_OBJECT (intf_disc), "dialog_action_area4", dialog_action_area4); gtk_widget_show (dialog_action_area4); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area4), GTK_BUTTONBOX_END); gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area4), 8); gnome_dialog_append_button (GNOME_DIALOG (intf_disc), GNOME_STOCK_BUTTON_OK); disc_ok = GTK_WIDGET (g_list_last (GNOME_DIALOG (intf_disc)->buttons)->data); gtk_widget_ref (disc_ok); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "disc_ok", disc_ok, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (disc_ok); GTK_WIDGET_SET_FLAGS (disc_ok, GTK_CAN_DEFAULT); gnome_dialog_append_button (GNOME_DIALOG (intf_disc), GNOME_STOCK_BUTTON_CANCEL); disc_cancel = GTK_WIDGET (g_list_last (GNOME_DIALOG (intf_disc)->buttons)->data); gtk_widget_ref (disc_cancel); gtk_object_set_data_full (GTK_OBJECT (intf_disc), "disc_cancel", disc_cancel, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (disc_cancel); GTK_WIDGET_SET_FLAGS (disc_cancel, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (disc_dvd), "toggled", GTK_SIGNAL_FUNC (on_disc_dvd_toggled), NULL); gtk_signal_connect (GTK_OBJECT (disc_vcd), "toggled", GTK_SIGNAL_FUNC (on_disc_vcd_toggled), NULL); gtk_signal_connect (GTK_OBJECT (disc_ok), "clicked", GTK_SIGNAL_FUNC (on_disc_ok_clicked), NULL); gtk_signal_connect (GTK_OBJECT (disc_cancel), "clicked", GTK_SIGNAL_FUNC (on_disc_cancel_clicked), NULL); return intf_disc; } GtkWidget* create_intf_network (void) { GtkWidget *intf_network; GtkWidget *vbox5; GtkWidget *hbox3; GtkWidget *frame3; GtkWidget *vbox6; GSList *network_group = NULL; GtkWidget *network_ts; GtkWidget *network_rtp; GtkWidget *network_http; GtkWidget *frame4; GtkWidget *table2; GtkWidget *label17; GtkWidget *label18; GtkObject *network_port_adj; GtkWidget *network_port; GtkWidget *network_server; GtkWidget *hbuttonbox1; GtkWidget *network_ok; GtkWidget *network_cancel; intf_network = gnome_dialog_new (_("Network Stream"), NULL); gtk_object_set_data (GTK_OBJECT (intf_network), "intf_network", intf_network); gtk_window_set_modal (GTK_WINDOW (intf_network), TRUE); gtk_window_set_policy (GTK_WINDOW (intf_network), FALSE, FALSE, FALSE); vbox5 = GNOME_DIALOG (intf_network)->vbox; gtk_object_set_data (GTK_OBJECT (intf_network), "vbox5", vbox5); gtk_widget_show (vbox5); hbox3 = gtk_hbox_new (FALSE, 5); gtk_widget_ref (hbox3); gtk_object_set_data_full (GTK_OBJECT (intf_network), "hbox3", hbox3, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox3); gtk_box_pack_start (GTK_BOX (vbox5), hbox3, TRUE, TRUE, 0); frame3 = gtk_frame_new (_("Protocol")); gtk_widget_ref (frame3); gtk_object_set_data_full (GTK_OBJECT (intf_network), "frame3", frame3, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (frame3); gtk_box_pack_start (GTK_BOX (hbox3), frame3, TRUE, TRUE, 0); vbox6 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox6); gtk_object_set_data_full (GTK_OBJECT (intf_network), "vbox6", vbox6, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox6); gtk_container_add (GTK_CONTAINER (frame3), vbox6); network_ts = gtk_radio_button_new_with_label (network_group, _("TS")); network_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_ts)); gtk_widget_ref (network_ts); gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_ts", network_ts, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (network_ts); gtk_box_pack_start (GTK_BOX (vbox6), network_ts, FALSE, FALSE, 0); network_rtp = gtk_radio_button_new_with_label (network_group, _("RTP")); network_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_rtp)); gtk_widget_ref (network_rtp); gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_rtp", network_rtp, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (network_rtp); gtk_box_pack_start (GTK_BOX (vbox6), network_rtp, FALSE, FALSE, 0); gtk_widget_set_sensitive (network_rtp, FALSE); network_http = gtk_radio_button_new_with_label (network_group, _("HTTP")); network_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_http)); gtk_widget_ref (network_http); gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_http", network_http, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (network_http); gtk_box_pack_start (GTK_BOX (vbox6), network_http, FALSE, FALSE, 0); gtk_widget_set_sensitive (network_http, FALSE); frame4 = gtk_frame_new (_("Server")); gtk_widget_ref (frame4); gtk_object_set_data_full (GTK_OBJECT (intf_network), "frame4", frame4, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (frame4); gtk_box_pack_start (GTK_BOX (hbox3), frame4, TRUE, TRUE, 0); table2 = gtk_table_new (2, 2, FALSE); gtk_widget_ref (table2); gtk_object_set_data_full (GTK_OBJECT (intf_network), "table2", table2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (table2); gtk_container_add (GTK_CONTAINER (frame4), table2); gtk_container_set_border_width (GTK_CONTAINER (table2), 5); gtk_table_set_row_spacings (GTK_TABLE (table2), 5); gtk_table_set_col_spacings (GTK_TABLE (table2), 5); label17 = gtk_label_new (_("Address")); gtk_widget_ref (label17); gtk_object_set_data_full (GTK_OBJECT (intf_network), "label17", label17, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label17); gtk_table_attach (GTK_TABLE (table2), label17, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label17), 0, 0.5); label18 = gtk_label_new (_("Port")); gtk_widget_ref (label18); gtk_object_set_data_full (GTK_OBJECT (intf_network), "label18", label18, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label18); gtk_table_attach (GTK_TABLE (table2), label18, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label18), 0, 0.5); network_port_adj = gtk_adjustment_new (1234, 0, 65535, 1, 10, 10); network_port = gtk_spin_button_new (GTK_ADJUSTMENT (network_port_adj), 1, 0); gtk_widget_ref (network_port); gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_port", network_port, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (network_port); gtk_table_attach (GTK_TABLE (table2), network_port, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); network_server = gtk_entry_new (); gtk_widget_ref (network_server); gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_server", network_server, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (network_server); gtk_table_attach (GTK_TABLE (table2), network_server, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_text (GTK_ENTRY (network_server), _("vls")); hbuttonbox1 = GNOME_DIALOG (intf_network)->action_area; gtk_object_set_data (GTK_OBJECT (intf_network), "hbuttonbox1", hbuttonbox1); gtk_widget_show (hbuttonbox1); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_END); gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox1), 8); gnome_dialog_append_button (GNOME_DIALOG (intf_network), GNOME_STOCK_BUTTON_OK); network_ok = GTK_WIDGET (g_list_last (GNOME_DIALOG (intf_network)->buttons)->data); gtk_widget_ref (network_ok); gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_ok", network_ok, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (network_ok); GTK_WIDGET_SET_FLAGS (network_ok, GTK_CAN_DEFAULT); gnome_dialog_append_button (GNOME_DIALOG (intf_network), GNOME_STOCK_BUTTON_CANCEL); network_cancel = GTK_WIDGET (g_list_last (GNOME_DIALOG (intf_network)->buttons)->data); gtk_widget_ref (network_cancel); gtk_object_set_data_full (GTK_OBJECT (intf_network), "network_cancel", network_cancel, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (network_cancel); GTK_WIDGET_SET_FLAGS (network_cancel, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (network_ok), "clicked", GTK_SIGNAL_FUNC (on_network_ok_clicked), NULL); gtk_signal_connect (GTK_OBJECT (network_cancel), "clicked", GTK_SIGNAL_FUNC (on_network_cancel_clicked), NULL); return intf_network; }