xchat-gnome r2648 - trunk/src/fe-gnome
- From: diegoe svn gnome org
- To: svn-commits-list gnome org
- Subject: xchat-gnome r2648 - trunk/src/fe-gnome
- Date: Wed, 3 Sep 2008 23:15:05 +0000 (UTC)
Author: diegoe
Date: Wed Sep 3 23:15:05 2008
New Revision: 2648
URL: http://svn.gnome.org/viewvc/xchat-gnome?rev=2648&view=rev
Log:
Hide resize grip when window is maximized
Patch by Juan Percy Rojas Cruz, closes: #518538.
Modified:
trunk/src/fe-gnome/main-window.c
Modified: trunk/src/fe-gnome/main-window.c
==============================================================================
--- trunk/src/fe-gnome/main-window.c (original)
+++ trunk/src/fe-gnome/main-window.c Wed Sep 3 23:15:05 2008
@@ -86,6 +86,8 @@
static gboolean on_main_window_focus_in (GtkWidget *widget, GdkEventFocus *event, gpointer data);
static gboolean on_main_window_configure (GtkWidget *widget, GdkEventConfigure *event, gpointer data);
+static gboolean on_main_window_window_state (GtkWidget *widget, GdkEventWindowState *event, gpointer data);
+
static void nickname_style_set (GtkWidget *button, GtkStyle *previous_style, gpointer data);
static GtkActionEntry action_entries [] = {
@@ -148,6 +150,7 @@
g_signal_connect (G_OBJECT (gui.main_window), "delete-event", G_CALLBACK (on_main_window_close), NULL);
g_signal_connect (G_OBJECT (gui.main_window), "focus-in-event", G_CALLBACK (on_main_window_focus_in), NULL);
g_signal_connect (G_OBJECT (gui.main_window), "configure-event", G_CALLBACK (on_main_window_configure), NULL);
+ g_signal_connect (G_OBJECT (gui.main_window), "window-state-event", G_CALLBACK (on_main_window_window_state), NULL);
/* hook up the menus */
gui.action_group = gtk_action_group_new ("MenuAction");
@@ -718,6 +721,20 @@
return FALSE;
}
+static gboolean
+on_main_window_window_state (GtkWidget *widget, GdkEventWindowState *event, gpointer data)
+{
+ if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED)
+ {
+ if (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED)
+ gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (gui.status_bar), FALSE);
+ else
+ gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (gui.status_bar), TRUE);
+ }
+
+ return FALSE;
+}
+
static void
nickname_style_set (GtkWidget *button, GtkStyle *previous_style, gpointer data)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]