From: Philip Chimento Date: Fri, 4 Feb 2011 17:13:25 +0000 (+0100) Subject: Clean up action group code X-Git-Tag: v0.9~146 X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=b30b05a569c24260332a746ed867a78730a19627;p=projects%2Fchimara%2Fchimara.git Clean up action group code --- diff --git a/player/chimara.ui b/player/chimara.ui index b7176c9..8bb7fc6 100644 --- a/player/chimara.ui +++ b/player/chimara.ui @@ -1,124 +1,225 @@ - + - - Chimara - 600 - 800 - + - - True - - - + + _About... + _About + About this application + gtk-about + + + + + + _Help + _Help + + + + + P_references + P_references + Configure the application + gtk-preferences + + + + + + _Paste + _Paste + Paste the clipboard + gtk-paste + + + + + + _Copy + _Copy + Copy the selection + gtk-copy + + + + + + _Quit + _Quit + Try to quit the game + gtk-media-stop + + + + + + Res_tart + Res_tart + Tell the game to restart + gtk-media-rewind + + + + + + _Undo + _Undo + Attempt to undo the last move (the game may not allow this) + gtk-undo + + + + + + + Open _Recent + Open _Recent + 10 + mru + + + + + + _Stop Game + _Stop + Immediately stop the running game + gtk-stop + + + + + + _Edit + _Edit + + + + + _Command + _Command + + + + + _Quit Chimara + _Quit Chimara + Leave the program + gtk-quit + + + + + + _Save + _Save + Save the game + gtk-save + + + + + + _Restore... + _Restore + Restore a previously saved game + gtk-open + + + + + + + _Open... + _Open + Quit the current game and load a new one + gtk-media-play + + + + + + + _Game + _Game - - - _Game - - - _Open... - _Open - Quit the current game and load a new one - gtk-media-play - - - - _Restore... - _Restore - Restore a previously saved game - gtk-open - - - - _Save - Save the game - gtk-save - - - - _Quit Chimara - Leave the program - gtk-quit - - - - _Command - - - _Edit - - - _Stop Game - _Stop - Immediately stop the running game - gtk-stop - - - - Open _Recent - mru - 10 - - - - _Undo - Attempt to undo the last move (the game may not allow this) - gtk-undo - - - - Res_tart - Tell the game to restart - gtk-media-rewind - - - - _Quit - Try to quit the game - gtk-media-stop - - - - _Copy - Copy the selection - gtk-copy - - - - _Paste - Paste the clipboard - gtk-paste - - - - P_references - Configure the application - gtk-preferences - - - - _Help - - - _About... - _About - About this application - gtk-about - + + + + _Center + _Center + gtk-justify-center + + + + + + _Underline + _Underline + Underline the text + gtk-underline + + + + + + _Italic + _Italic + Print the text in italics + gtk-italic + + + + + + _Bold + _Bold + Make the text bold + gtk-bold + + + + + + Align _right + Align _right + Align text to the right + gtk-justify-right + + + + + + Align _justify + Align _justify + Justify the text + gtk-justify-fill + + + + + + Align _left + Align _left + Align text to the left + gtk-justify-left + + + + False 5 About Chimara center dialog - False Chimara - © 2008–2009 Marijn van Vliet and Philip Chimento + © 2008–2009 Marijn van Vliet and Philip Chimento Interactive Fiction Player Copyright (C) 2008, Philip Chimento and Marijn van Vliet. All rights reserved. @@ -150,40 +251,119 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Marijn van Vliet Philip Chimento - - + + True + False 2 - - - True + False end False + True end 0 + + + + + + + + False + Chimara + 600 + 800 + + + + True + False + + + + False 5 Chimara Preferences center dialog - - + + True + False 9 + + + True + False + end + + + gtk-save + True + True + True + False + True + + + False + False + 0 + + + + + Reset + True + True + True + False + + + False + False + 1 + + + + + gtk-close + True + True + True + False + True + + + + False + False + 2 + + + + + False + True + end + 0 + + True @@ -191,11 +371,13 @@ Philip Chimento True + False True + False Environment @@ -205,13 +387,16 @@ Philip Chimento True + False True + False 2 True + False 1 5 Load layout from this CSS file: @@ -224,6 +409,7 @@ Philip Chimento 250 True + False Select A CSS File @@ -234,15 +420,18 @@ Philip Chimento False + True 0 True + False False + True 5 1 @@ -250,21 +439,25 @@ Philip Chimento True + False True + False 0 5 Select a style to edit: False + True 0 True + False 163 @@ -282,22 +475,28 @@ Philip Chimento + True + True 0 True + False True + False True + False Font: False + True 5 0 @@ -307,15 +506,19 @@ Philip Chimento True True True - + False + + True + True 1 False + True 0 @@ -323,6 +526,7 @@ Philip Chimento 130 True + False 40 @@ -330,8 +534,9 @@ Philip Chimento True True True + False #000000000000 - + 125 @@ -341,6 +546,7 @@ Philip Chimento True + False 5 Foreground color: @@ -352,6 +558,7 @@ Philip Chimento True + False Background color: @@ -366,8 +573,9 @@ Philip Chimento True True True + False #ffffffffffff - + 125 @@ -379,12 +587,12 @@ Philip Chimento 283 50 True + False icons True - align-left - True + False Align _left True gtk-justify-left @@ -397,7 +605,7 @@ Philip Chimento True - align-center + False Align _center True gtk-justify-center @@ -410,8 +618,7 @@ Philip Chimento True - align-right - True + False Align _right True gtk-justify-right @@ -424,8 +631,7 @@ Philip Chimento True - align-justify - True + False Align _justify True gtk-justify-fill @@ -438,6 +644,7 @@ Philip Chimento True + False False @@ -447,8 +654,7 @@ Philip Chimento True - bold - True + False _Bold True gtk-bold @@ -461,8 +667,7 @@ Philip Chimento True - italic - True + False _Italic True gtk-italic @@ -475,8 +680,7 @@ Philip Chimento True - underline - True + False _Underline True gtk-underline @@ -493,22 +697,30 @@ Philip Chimento + True + True 1 + True + True 1 + True + True 5 1 + True + True 5 2 @@ -517,6 +729,7 @@ Philip Chimento 30 True + False 0 1 5 @@ -524,6 +737,7 @@ Philip Chimento False + True 3 @@ -538,6 +752,8 @@ Philip Chimento 10 + True + True 4 @@ -549,6 +765,7 @@ Philip Chimento True + False Layout @@ -559,6 +776,7 @@ Philip Chimento True + False @@ -576,6 +794,7 @@ Philip Chimento True + False Interpreters @@ -585,62 +804,11 @@ Philip Chimento + True + True 2 - - - True - end - - - gtk-save - True - True - True - True - - - False - False - 0 - - - - - Reset - True - True - True - - - False - False - 1 - - - - - gtk-close - True - True - True - True - - - - False - False - 2 - - - - - False - end - 0 - - @@ -649,51 +817,4 @@ Philip Chimento button-close - - - Align _left - Align _left - Align text to the left - gtk-justify-left - - - - Align _justify - Align _justify - Justify the text - gtk-justify-fill - - - - Align _right - Align _right - Align text to the right - gtk-justify-right - - - - _Bold - _Bold - Make the text bold - gtk-bold - - - - _Italic - _Italic - Print the text in italics - gtk-italic - - - - _Underline - _Underline - Underline the text - gtk-underline - - - - gtk-justify-center - - diff --git a/player/main.c b/player/main.c index 9bfcb6f..9722235 100644 --- a/player/main.c +++ b/player/main.c @@ -110,52 +110,15 @@ create_window(void) aboutwindow = GTK_WIDGET(load_object("aboutwindow")); prefswindow = GTK_WIDGET(load_object("prefswindow")); GtkActionGroup *actiongroup = GTK_ACTION_GROUP(load_object("actiongroup")); - GtkActionGroup *style_actiongroup = GTK_ACTION_GROUP(load_object("style-actiongroup")); - /* Add all the actions to the action group. This for-loop is a temporary fix - and can be removed once Glade supports adding actions and accelerators to an - action group. */ - const gchar *actions[] = { - "game", "", - "open", "O", - "recent", "", - "stop", "", - "quit_chimara", NULL, /* NULL means use stock accelerator */ - "command", "", - "undo", "Z", - "save", NULL, - "restore", "R", - "restart", "", - "quit", "", - "edit", "", - "copy", NULL, - "paste", NULL, - "preferences", "", - "help", "", - "about", "", - NULL - }; - const gchar *style_actions[] = { - "align-left", - "align-justify", - "align-right", - "bold", - "italic", - "underline", - NULL - }; const gchar **ptr; - for(ptr = actions; *ptr; ptr += 2) - gtk_action_group_add_action_with_accel(actiongroup, GTK_ACTION(load_object(ptr[0])), ptr[1]); - for(ptr = style_actions; *ptr; ptr ++) - gtk_action_group_add_action(style_actiongroup, GTK_ACTION(load_object(*ptr))); GtkRecentFilter *filter = gtk_recent_filter_new(); /* TODO: Use mimetypes and construct the filter dynamically depending on what plugins are installed */ const gchar *patterns[] = { "*.z[1-8]", "*.[zg]lb", "*.[zg]blorb", "*.ulx", "*.blb", "*.blorb", NULL }; - + for(ptr = patterns; *ptr; ptr++) gtk_recent_filter_add_pattern(filter, *ptr); GtkRecentChooser *recent = GTK_RECENT_CHOOSER(load_object("recent"));