Search
lxdream.org :: lxdream :: r1098:4f2750753a6c
lxdream 0.9.1
released Jun 29
Download Now
changeset1098:4f2750753a6c
parent1097:d4807997e450
child1099:566cdeb157ec
authornkeynes
dateSun Jan 31 18:36:06 2010 +1000 (10 years ago)
Show '<no disc>' in the title bar when there is no cdrom disc attached
src/cocoaui/cocoa_win.m
src/cocoaui/cocoaui.m
src/gtkui/gtk_win.c
src/gtkui/gtkui.c
1.1 --- a/src/cocoaui/cocoa_win.m Sun Jan 31 18:35:06 2010 +1000
1.2 +++ b/src/cocoaui/cocoa_win.m Sun Jan 31 18:36:06 2010 +1000
1.3 @@ -179,7 +179,7 @@
1.4 NSString *title;
1.5 const char *disc_title = gdrom_get_current_disc_title();
1.6 if( disc_title == NULL ) {
1.7 - title = [NSString stringWithCString: lxdream_package_name];
1.8 + title = [NSString stringWithFormat: @"%s - <no disc>", lxdream_package_name];
1.9 } else {
1.10 title = [NSString stringWithFormat: @"%s - %s", lxdream_package_name, disc_title];
1.11 }
2.1 --- a/src/cocoaui/cocoaui.m Sun Jan 31 18:35:06 2010 +1000
2.2 +++ b/src/cocoaui/cocoaui.m Sun Jan 31 18:36:06 2010 +1000
2.3 @@ -59,7 +59,7 @@
2.4 - (void) setAppleMenu:(NSMenu *)aMenu;
2.5 @end
2.6
2.7 -gboolean cocoa_gui_disc_changed( gdrom_disc_t disc, const gchar *disc_name, void *user_data )
2.8 +gboolean cocoa_gui_disc_changed( cdrom_disc_t disc, const gchar *disc_name, void *user_data )
2.9 {
2.10 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
2.11 LxdreamMainWindow *window = (LxdreamMainWindow *)user_data;
3.1 --- a/src/gtkui/gtk_win.c Sun Jan 31 18:35:06 2010 +1000
3.2 +++ b/src/gtkui/gtk_win.c Sun Jan 31 18:36:06 2010 +1000
3.3 @@ -422,12 +422,12 @@
3.4 void main_window_update_title( main_window_t win )
3.5 {
3.6 const char *disc = gdrom_get_current_disc_title();
3.7 + char buf[256];
3.8
3.9 if( disc == NULL ) {
3.10 - gtk_window_set_title( GTK_WINDOW(win->window), lxdream_package_name );
3.11 + snprintf( buf, sizeof(buf), "%s - <%s>", lxdream_package_name, _("no disc") );
3.12 } else {
3.13 - char buf[256];
3.14 snprintf( buf, sizeof(buf), "%s - %s", lxdream_package_name, disc );
3.15 - gtk_window_set_title( GTK_WINDOW(win->window), buf );
3.16 }
3.17 + gtk_window_set_title( GTK_WINDOW(win->window), buf );
3.18 }
4.1 --- a/src/gtkui/gtkui.c Sun Jan 31 18:35:06 2010 +1000
4.2 +++ b/src/gtkui/gtkui.c Sun Jan 31 18:36:06 2010 +1000
4.3 @@ -232,7 +232,7 @@
4.4 return gtk_gui_init_ok;
4.5 }
4.6
4.7 -gboolean gtk_gui_disc_changed( gdrom_disc_t disc, const gchar *disc_name, void *ptr )
4.8 +gboolean gtk_gui_disc_changed( cdrom_disc_t disc, const gchar *disc_name, void *ptr )
4.9 {
4.10 main_window_update_title( main_win );
4.11 return TRUE;
.