[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeciv-dev
Subject:    [Freeciv-Dev] (PR#40733) [Patch] Option to hide message window
From:       "Madeline Book" <madeline.book () gmail ! com>
Date:       2009-02-19 4:21:16
Message-ID: 200902190421.n1J4LGxp022104 () rt ! freeciv ! org
[Download RAW message or body]

[Attachment #2 (text/plain)]


<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40733 >

Patch implements a gui option to hide the "inspect city"
and "goto" buttons in the message window.


-----------------------------------------------------------------------
押さなきゃならないボタンを見つからないん よ。

["optional_messagewin_buttons.patch" (text/x-diff)]

 client/gui-gtk-2.0/gui_main.c   |   12 ++++++++++++
 client/gui-gtk-2.0/gui_main.h   |    1 +
 client/gui-gtk-2.0/messagewin.c |   16 +++++++++-------
 3 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/client/gui-gtk-2.0/gui_main.c b/client/gui-gtk-2.0/gui_main.c
index abea9ef..5a2c39f 100644
--- a/client/gui-gtk-2.0/gui_main.c
+++ b/client/gui-gtk-2.0/gui_main.c
@@ -97,6 +97,7 @@ bool better_fog = TRUE;
 bool show_chat_message_time = FALSE;
 bool split_bottom_notebook = FALSE;
 bool new_messages_go_to_top = FALSE;
+bool show_message_window_buttons = TRUE;
 bool metaserver_tab_first = FALSE;
 
 GtkWidget *toplevel;
@@ -205,6 +206,17 @@ client_option gui_options[] = {
                      "message window will appear at the top of the list, "
                      "rather than being appended at the bottom."),
                   COC_INTERFACE),
+  GEN_BOOL_OPTION(show_message_window_buttons,
+                  N_("Show extra message window buttons"),
+                  N_("If this option is enabled, there will be two "
+                     "buttons displayed in the message window for "
+                     "inspecting a city and going to a location. If this "
+                     "option is disabled, these buttons will not appear "
+                     "(you can still double-click with the left mouse "
+                     "button or right-click on a row to inspect or goto "
+                     "respectively). This option will only take effect "
+                     "once the message window is closed and reopened."),
+                  COC_INTERFACE),
   GEN_BOOL_OPTION(metaserver_tab_first,
                   N_("Metaserver tab first in network page"),
                   N_("If this option is enabled, the metaserver tab will "
diff --git a/client/gui-gtk-2.0/gui_main.h b/client/gui-gtk-2.0/gui_main.h
index 96c0dc2..bc03bc7 100644
--- a/client/gui-gtk-2.0/gui_main.h
+++ b/client/gui-gtk-2.0/gui_main.h
@@ -29,6 +29,7 @@ extern bool better_fog;
 extern bool show_chat_message_time;
 extern bool split_bottom_notebook;
 extern bool new_messages_go_to_top;
+extern bool show_message_window_buttons;
 extern bool metaserver_tab_first;
 
 extern GdkGC *          civ_gc;
diff --git a/client/gui-gtk-2.0/messagewin.c b/client/gui-gtk-2.0/messagewin.c
index 5fe7c37..11eb1d4 100644
--- a/client/gui-gtk-2.0/messagewin.c
+++ b/client/gui-gtk-2.0/messagewin.c
@@ -217,13 +217,15 @@ static void create_meswin_dialog(void)
   g_signal_connect(view, "button-press-event",
                    G_CALLBACK(meswin_button_press_callback), NULL);
 
-  cmd = gui_dialog_add_stockbutton(meswin_shell, GTK_STOCK_JUMP_TO,
-      _("Goto _Location"), CMD_GOTO);
-  gtk_widget_set_sensitive(cmd, FALSE);
-  
-  cmd = gui_dialog_add_stockbutton(meswin_shell, GTK_STOCK_ZOOM_IN,
-      _("Inspect _City"), CMD_POPCITY);
-  gtk_widget_set_sensitive(cmd, FALSE);
+  if (show_message_window_buttons) {
+    cmd = gui_dialog_add_stockbutton(meswin_shell, GTK_STOCK_JUMP_TO,
+                                     _("Goto _Location"), CMD_GOTO);
+    gtk_widget_set_sensitive(cmd, FALSE);
+
+    cmd = gui_dialog_add_stockbutton(meswin_shell, GTK_STOCK_ZOOM_IN,
+                                     _("Inspect _City"), CMD_POPCITY);
+    gtk_widget_set_sensitive(cmd, FALSE);
+  }
 
   gui_dialog_add_button(meswin_shell, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
 


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic