157 lines
8.4 KiB
Plaintext
157 lines
8.4 KiB
Plaintext
$OpenBSD: patch-src_gui_c,v 1.8 2010/07/08 06:29:12 dcoppa Exp $
|
|
|
|
fixes from upstream svn:
|
|
add missing icons to the file menu
|
|
activate Open on enter in Open->Location (fix upstream bug #381)
|
|
NULL check on retrieve_metadata_pool clear process
|
|
|
|
revised audio/video device selection gui
|
|
set DVD device to /dev/rcd0c instead of /dev/dvd
|
|
|
|
--- src/gui.c.orig Thu Feb 25 17:01:41 2010
|
|
+++ src/gui.c Wed May 5 08:58:26 2010
|
|
@@ -1555,11 +1555,13 @@ gboolean delete_callback(GtkWidget * widget, GdkEvent
|
|
|
|
if (control_id == 0) {
|
|
g_thread_pool_stop_unused_threads();
|
|
- while (gtk_events_pending() || thread != NULL
|
|
- || g_thread_pool_unprocessed(retrieve_metadata_pool)) {
|
|
- gtk_main_iteration();
|
|
+ if (retrieve_metadata_pool != NULL) {
|
|
+ while (gtk_events_pending() || thread != NULL
|
|
+ || g_thread_pool_unprocessed(retrieve_metadata_pool)) {
|
|
+ gtk_main_iteration();
|
|
+ }
|
|
+ g_thread_pool_free(retrieve_metadata_pool, TRUE, TRUE);
|
|
}
|
|
- g_thread_pool_free(retrieve_metadata_pool, TRUE, TRUE);
|
|
} else {
|
|
while (gtk_events_pending() || thread != NULL) {
|
|
gtk_main_iteration();
|
|
@@ -2766,6 +2768,7 @@ void menuitem_open_location_callback(GtkMenuItem * men
|
|
label = gtk_label_new(_("Location:"));
|
|
open_location = gtk_entry_new();
|
|
gtk_entry_set_width_chars(GTK_ENTRY(open_location), 50);
|
|
+ gtk_entry_set_activates_default(GTK_ENTRY(open_location),TRUE);
|
|
item_box = gtk_hbox_new(FALSE, 6);
|
|
gtk_box_pack_start(GTK_BOX(item_box), label, FALSE, FALSE, 12);
|
|
gtk_box_pack_end(GTK_BOX(item_box), open_location, TRUE, TRUE, 0);
|
|
@@ -4796,15 +4799,13 @@ void menuitem_config_callback(GtkMenuItem * menuitem,
|
|
tooltip = gtk_tooltips_new();
|
|
gtk_tooltips_set_tip(tooltip, config_vo,
|
|
_
|
|
- ("mplayer video output device\nx11 should always work, try xv or gl for better performance"),
|
|
+ ("mplayer video output device\nx11 should always work\nTry xv or gl for better performance"),
|
|
NULL);
|
|
if (config_vo != NULL) {
|
|
gtk_combo_box_append_text(GTK_COMBO_BOX(config_vo), "gl");
|
|
gtk_combo_box_append_text(GTK_COMBO_BOX(config_vo), "gl2");
|
|
gtk_combo_box_append_text(GTK_COMBO_BOX(config_vo), "x11");
|
|
gtk_combo_box_append_text(GTK_COMBO_BOX(config_vo), "xv");
|
|
- gtk_combo_box_append_text(GTK_COMBO_BOX(config_vo), "xvmc");
|
|
- gtk_combo_box_append_text(GTK_COMBO_BOX(config_vo), "vdpau");
|
|
if (vo != NULL) {
|
|
if (strcmp(vo, "gl") == 0)
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(config_vo), 0);
|
|
@@ -4814,14 +4815,10 @@ void menuitem_config_callback(GtkMenuItem * menuitem,
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(config_vo), 2);
|
|
if (strcmp(vo, "xv") == 0)
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(config_vo), 3);
|
|
- if (strcmp(vo, "xvmc") == 0)
|
|
- gtk_combo_box_set_active(GTK_COMBO_BOX(config_vo), 4);
|
|
- if (strcmp(vo, "vdpau") == 0)
|
|
- gtk_combo_box_set_active(GTK_COMBO_BOX(config_vo), 5);
|
|
if (gtk_combo_box_get_active(GTK_COMBO_BOX(config_vo))
|
|
== -1) {
|
|
gtk_combo_box_append_text(GTK_COMBO_BOX(config_vo), vo);
|
|
- gtk_combo_box_set_active(GTK_COMBO_BOX(config_vo), 6);
|
|
+ gtk_combo_box_set_active(GTK_COMBO_BOX(config_vo), 4);
|
|
}
|
|
}
|
|
}
|
|
@@ -4891,32 +4888,29 @@ void menuitem_config_callback(GtkMenuItem * menuitem,
|
|
tooltip = gtk_tooltips_new();
|
|
gtk_tooltips_set_tip(tooltip, config_ao,
|
|
_
|
|
- ("mplayer audio output device\nalsa or oss should always work, try esd in gnome, arts in kde, or pulse on newer distributions"),
|
|
+ ("mplayer audio output device\nsndio should always work\nTry esd under GNOME, arts under KDE\nTry jack if you use the JACK sound server\nUse rtunes if you want to stream to an Apple AirPort Express"),
|
|
NULL);
|
|
if (config_ao != NULL) {
|
|
- gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "alsa");
|
|
- gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "arts");
|
|
+ gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "sndio");
|
|
gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "esd");
|
|
+ gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "arts");
|
|
gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "jack");
|
|
- gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "oss");
|
|
- gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "pulse");
|
|
+ gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "rtunes");
|
|
if (ao != NULL) {
|
|
- if (strcmp(ao, "alsa") == 0)
|
|
+ if (strcmp(ao, "sndio") == 0)
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 0);
|
|
- if (strcmp(ao, "arts") == 0)
|
|
- gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 1);
|
|
if (strcmp(ao, "esd") == 0)
|
|
+ gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 1);
|
|
+ if (strcmp(ao, "arts") == 0)
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 2);
|
|
if (strcmp(ao, "jack") == 0)
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 3);
|
|
- if (strcmp(ao, "oss") == 0)
|
|
+ if (strcmp(ao, "rtunes") == 0)
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 4);
|
|
- if (strcmp(ao, "pulse") == 0)
|
|
- gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 5);
|
|
if (gtk_combo_box_get_active(GTK_COMBO_BOX(config_ao))
|
|
== -1) {
|
|
gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), ao);
|
|
- gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 6);
|
|
+ gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 5);
|
|
}
|
|
}
|
|
}
|
|
@@ -4995,8 +4989,8 @@ void menuitem_config_callback(GtkMenuItem * menuitem,
|
|
j = -1;
|
|
|
|
config_mplayer_dvd_device = gtk_combo_box_entry_new_text();
|
|
- gtk_combo_box_append_text(GTK_COMBO_BOX(config_mplayer_dvd_device), "/dev/dvd");
|
|
- if (mplayer_dvd_device == NULL || g_ascii_strcasecmp("/dev/dvd", mplayer_dvd_device) == 0) {
|
|
+ gtk_combo_box_append_text(GTK_COMBO_BOX(config_mplayer_dvd_device), "/dev/rcd0c");
|
|
+ if (mplayer_dvd_device == NULL || g_ascii_strcasecmp("/dev/rcd0c", mplayer_dvd_device) == 0) {
|
|
j = i;
|
|
}
|
|
i++;
|
|
@@ -6222,12 +6216,19 @@ GtkWidget *create_window(gint windowid)
|
|
gtk_menu_append(menu_file, GTK_WIDGET(menuitem_file_open));
|
|
menuitem_file_open_folder =
|
|
GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(_("Open _Folder")));
|
|
+ gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem_file_open_folder),
|
|
+ gtk_image_new_from_icon_name("folder",GTK_ICON_SIZE_MENU));
|
|
gtk_menu_append(menu_file, GTK_WIDGET(menuitem_file_open_folder));
|
|
menuitem_file_open_location =
|
|
GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(_("Open _Location")));
|
|
+ gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem_file_open_location),
|
|
+ gtk_image_new_from_icon_name("network-server",GTK_ICON_SIZE_MENU));
|
|
gtk_menu_append(menu_file, GTK_WIDGET(menuitem_file_open_location));
|
|
|
|
- menuitem_file_disc = GTK_MENU_ITEM(gtk_menu_item_new_with_mnemonic(_("_Disc")));
|
|
+ menuitem_file_disc =
|
|
+ GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(_("_Disc")));
|
|
+ gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem_file_disc),
|
|
+ gtk_image_new_from_icon_name("media-optical",GTK_ICON_SIZE_MENU));
|
|
menu_file_disc = GTK_MENU(gtk_menu_new());
|
|
gtk_widget_show(GTK_WIDGET(menuitem_file_disc));
|
|
gtk_menu_shell_append(GTK_MENU_SHELL(menu_file), GTK_WIDGET(menuitem_file_disc));
|
|
@@ -6276,7 +6277,9 @@ GtkWidget *create_window(gint windowid)
|
|
gtk_menu_append(menu_file_tv, GTK_WIDGET(menuitem_file_open_dtv));
|
|
#ifdef HAVE_GPOD
|
|
menuitem_file_open_ipod =
|
|
- GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(_("Open _iPod™")));
|
|
+ GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(_("Open _iPod")));
|
|
+ gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem_file_open_ipod),
|
|
+ gtk_image_new_from_icon_name("multimedia-player",GTK_ICON_SIZE_MENU));
|
|
gtk_menu_append(menu_file, GTK_WIDGET(menuitem_file_open_ipod));
|
|
#endif
|
|
#ifdef GTK2_12_ENABLED
|