[Pioneers-commits] r33 - in trunk: client/gtk debian
kemm at garage.maemo.org
kemm at garage.maemo.org
Sun Mar 23 03:25:24 EET 2008
Author: kemm
Date: 2008-03-23 03:25:23 +0200 (Sun, 23 Mar 2008)
New Revision: 33
Modified:
trunk/client/gtk/gui.c
trunk/debian/changelog
Log:
Highlight 'Chat' tab on new messages
Modified: trunk/client/gtk/gui.c
===================================================================
--- trunk/client/gtk/gui.c 2008-03-22 22:58:39 UTC (rev 32)
+++ trunk/client/gtk/gui.c 2008-03-23 01:25:23 UTC (rev 33)
@@ -60,6 +60,8 @@
SPLASH_PAGE /* splash screen */
};
+static const gchar *chat_label_text;
+
static GtkWidget *map_notebook; /* map area panel */
static GtkWidget *trade_page; /* trade page in map area */
static GtkWidget *quote_page; /* quote page in map area */
@@ -473,11 +475,35 @@
return map_area;
}
+
+static void chat_modified_cb(G_GNUC_UNUSED GtkTextBuffer *textbuffer,
+ G_GNUC_UNUSED GtkTextIter *location,
+ gchar *text, gint len,
+ G_GNUC_UNUSED gpointer user_data)
+{
+ if (text[len - 1] != '\n')
+ return;
+
+ if (gtk_notebook_get_current_page(GTK_NOTEBOOK(map_notebook)) != CHAT_PAGE)
+ {
+ GtkWidget *child;
+ GtkWidget *lbl;
+ gchar *label;
+
+ child = gtk_notebook_get_nth_page(GTK_NOTEBOOK(map_notebook), CHAT_PAGE);
+ lbl = gtk_notebook_get_tab_label(GTK_NOTEBOOK(map_notebook), child);
+
+ label = g_markup_printf_escaped("<span foreground=\"#0000FF\" weight=\"bold\">%s</span>", chat_label_text);
+ gtk_label_set_markup(GTK_LABEL(lbl), label);
+ }
+}
+
static GtkWidget *build_messages_panel(void)
{
GtkWidget *vbox;
GtkWidget *label;
GtkWidget *scroll_win;
+ GtkTextBuffer *buffer;
vbox = gtk_vbox_new(FALSE, 5);
gtk_widget_show(vbox);
@@ -504,6 +530,9 @@
gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(messages_txt),
GTK_WRAP_WORD);
+ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(messages_txt));
+ g_signal_connect(G_OBJECT(buffer), "insert-text", G_CALLBACK(chat_modified_cb), NULL);
+
message_window_set_text(messages_txt);
return vbox;
@@ -592,6 +621,22 @@
return viewport;
}
+static gboolean notebook_change_page_cb(G_GNUC_UNUSED GtkNotebook *notebook,
+ G_GNUC_UNUSED GtkNotebookPage *page,
+ gint page_num,
+ G_GNUC_UNUSED gpointer user_data)
+{
+ GtkWidget *child;
+ GtkWidget *lbl;
+
+ if (page_num != CHAT_PAGE)
+ return TRUE;
+
+ child = gtk_notebook_get_nth_page(GTK_NOTEBOOK(map_notebook), CHAT_PAGE);
+ lbl = gtk_notebook_get_tab_label(GTK_NOTEBOOK(map_notebook), child);
+ gtk_label_set_text(GTK_LABEL(lbl), chat_label_text);
+}
+
static GtkWidget *build_map_panel(void)
{
GtkWidget *lbl;
@@ -613,7 +658,8 @@
scrollable, lbl, MAP_PAGE);
/* Tab page name */
- lbl = gtk_label_new(_("Chat"));
+ lbl = gtk_label_new(chat_label_text);
+ gtk_label_set_use_markup(GTK_LABEL(lbl), TRUE);
gtk_widget_show(lbl);
chat_panel = gtk_vbox_new(FALSE, 0);
gtk_widget_show(chat_panel);
@@ -664,6 +710,8 @@
splash_page, lbl, SPLASH_PAGE);
gui_show_splash_page(TRUE);
+ g_signal_connect(G_OBJECT(map_notebook), "switch-page", G_CALLBACK(notebook_change_page_cb), NULL);
+
return map_notebook;
}
@@ -1515,6 +1563,8 @@
gchar *icon_file;
HildonProgram *program;
+ chat_label_text = _("Chat");
+
player_init();
gmap = guimap_new();
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-03-22 22:58:39 UTC (rev 32)
+++ trunk/debian/changelog 2008-03-23 01:25:23 UTC (rev 33)
@@ -1,8 +1,15 @@
-maemo-pioneers (0.0.2-3) unstable; urgency=low
+maemo-pioneers (0.0.3-1) unstable; urgency=low
- * Move to ITOS2008
- * Hildonization
* UI improvements
+ * Draw current score on the statusbar
+ * Move 'Player Summary' to the separate tab
+ * Split legend's dialog and tab into 2 tabs on the new notebook
+ * Trade tab fits to screen
+ * Expand development cards list
+ * Scrollable map
+ * Map zoom in/out
+ * Highlight 'Chat' tab on new messages
+ * Network now uses conic library
- -- Alexey Antipovsky <alexey.antipovsky at gmail.com> Mon, 18 Feb 2008 02:21:50 +0300
+ -- Alexey Antipovsky <alexey.antipovsky at gmail.com> Sun, 23 Mar 2008 04:06:38 +0300
More information about the Pioneers-commits
mailing list