From 95b6ea0b272ff535ab3e35f80444c9e7d3a3b6a0 Mon Sep 17 00:00:00 2001 From: yabause Date: Sun, 7 Jan 2007 00:02:16 +0000 Subject: [PATCH] Commited evilynux patch for gap between screens. --- desmume/src/gtk-glade/callbacks.c | 27 +++++++++++++++++++++++ desmume/src/gtk-glade/callbacks.h | 1 + desmume/src/gtk-glade/glade/DeSmuMe.glade | 9 ++++++++ 3 files changed, 37 insertions(+) diff --git a/desmume/src/gtk-glade/callbacks.c b/desmume/src/gtk-glade/callbacks.c index f60633297..aa1813d12 100755 --- a/desmume/src/gtk-glade/callbacks.c +++ b/desmume/src/gtk-glade/callbacks.c @@ -185,6 +185,33 @@ void on_menu_rotatescreen_activate (GtkMenuItem *menuitem, gpointer user_data) resize(ScreenCoeff_Size); } +void on_menu_gapscreen_activate (GtkMenuItem *menuitem, gpointer user_data) { + /* we want to add a gap between screens */ + gboolean ScreenGap = gtk_check_menu_item_get_active((GtkCheckMenuItem*)menuitem); + GtkWidget * spacer = glade_xml_get_widget(xml, "misc_sep4"); + GtkWidget * layoutvbox = glade_xml_get_widget(xml, "wvb_Layout"); + + if (ScreenGap) { + gtk_box_set_child_packing( + layoutvbox, + spacer, + FALSE, + FALSE, + 33, + GTK_PACK_START); + } else { + gtk_box_set_child_packing( + layoutvbox, + spacer, + FALSE, + FALSE, + 0, + GTK_PACK_START); + } + /* Resize so we don't end up with unwanted space at the bottom */ + resize(ScreenCoeff_Size); +} + /* MENU TOOLS ***** ***** ***** ***** */ void on_menu_IO_regs_activate (GtkMenuItem *menuitem, gpointer user_data) { GtkWidget * dlg = glade_xml_get_widget(xml_tools, "wtools_1_IOregs"); diff --git a/desmume/src/gtk-glade/callbacks.h b/desmume/src/gtk-glade/callbacks.h index e365c550d..b8ada0006 100755 --- a/desmume/src/gtk-glade/callbacks.h +++ b/desmume/src/gtk-glade/callbacks.h @@ -33,6 +33,7 @@ void on_menu_controls_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_audio_on_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_rightscreen_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_rotatescreen_activate (GtkMenuItem *menuitem, gpointer user_data); +void on_menu_gapscreen_activate (GtkMenuItem *menuitem, gpointer user_data); /* MENU TOOLS */ void on_menu_IO_regs_activate (GtkMenuItem *menuitem, gpointer user_data); /* MENU ? */ diff --git a/desmume/src/gtk-glade/glade/DeSmuMe.glade b/desmume/src/gtk-glade/glade/DeSmuMe.glade index 8b81ab552..7947df94e 100755 --- a/desmume/src/gtk-glade/glade/DeSmuMe.glade +++ b/desmume/src/gtk-glade/glade/DeSmuMe.glade @@ -370,6 +370,15 @@ + + + True + Gap between screens + True + False + + +