[Freeciv-Dev] (PR#10932) Keyboard shortcut changes
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: |
[Freeciv-Dev] (PR#10932) Keyboard shortcut changes |
From: |
"Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx> |
Date: |
Sat, 13 Nov 2004 16:33:52 -0800 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10932 >
This patch enables tab scrolling and adds a tooltip to the tab close
buttons.
Index: client/gui-gtk-2.0/gui_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/gui_main.c,v
retrieving revision 1.89
diff -u -u -r1.89 gui_main.c
--- client/gui-gtk-2.0/gui_main.c 8 Nov 2004 00:14:29 -0000 1.89
+++ client/gui-gtk-2.0/gui_main.c 14 Nov 2004 00:32:37 -0000
@@ -851,7 +851,6 @@
populate_unit_pixmap_table();
top_notebook = gtk_notebook_new();
- GTK_WIDGET_UNSET_FLAGS(top_notebook, GTK_CAN_FOCUS);
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(top_notebook), GTK_POS_BOTTOM);
gtk_notebook_set_scrollable(GTK_NOTEBOOK(top_notebook), TRUE);
gtk_box_pack_start(GTK_BOX(hbox), top_notebook, TRUE, TRUE, 0);
@@ -920,7 +919,6 @@
avbox = detached_widget_fill(sbox);
bottom_notebook = gtk_notebook_new();
- GTK_WIDGET_UNSET_FLAGS(bottom_notebook, GTK_CAN_FOCUS);
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(bottom_notebook), GTK_POS_TOP);
gtk_notebook_set_scrollable(GTK_NOTEBOOK(bottom_notebook), TRUE);
gtk_box_pack_start(GTK_BOX(avbox), bottom_notebook, TRUE, TRUE, 0);
Index: client/gui-gtk-2.0/gui_stuff.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/gui_stuff.c,v
retrieving revision 1.16
diff -u -u -r1.16 gui_stuff.c
--- client/gui-gtk-2.0/gui_stuff.c 7 Nov 2004 14:17:31 -0000 1.16
+++ client/gui-gtk-2.0/gui_stuff.c 14 Nov 2004 00:32:37 -0000
@@ -25,6 +25,7 @@
#include "fcintl.h"
#include "mem.h"
+#include "support.h"
#include "colors.h"
#include "options.h"
@@ -428,6 +429,7 @@
{
GtkWidget *hbox, *label, *image, *button;
gint w, h;
+ char buf[256];
gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &w, &h);
@@ -443,6 +445,9 @@
g_signal_connect_swapped(button, "clicked",
G_CALLBACK(gui_dialog_destroy), dlg);
+ my_snprintf(buf, sizeof(buf), _("Close Tab:\n%s"), "Ctrl+W");
+ gtk_tooltips_set_tip(main_tips, button, buf, "");
+
image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
gtk_widget_set_size_request(button, w, h);
gtk_container_add(GTK_CONTAINER(button), image);
|
|