nemiver r708 - in trunk: . glade src src/workbench
- From: dodji svn gnome org
- To: svn-commits-list gnome org
- Subject: nemiver r708 - in trunk: . glade src src/workbench
- Date: Fri, 18 Jan 2008 10:08:47 +0000 (GMT)
Author: dodji
Date: Fri Jan 18 10:08:47 2008
New Revision: 708
URL: http://svn.gnome.org/viewvc/nemiver?rev=708&view=rev
Log:
[workbench] candidate fix for breakage under sawfish WM.
* src/workbench/nmv-workbench.cc:
Workbench::init_glade(): don't hide the workbench toplevel window
once glade creates it. Otherwise it confuses some window managers
that just won't show it anymore. That leads to nemiver showing
up without decorations with some of these these window manages.
I have tested this with sawfish.
* src/main.cc: no need to show_all the root window anymore.
Glade does it for us actually.
* glade/workbench.glade: little update of the interface.
Modified:
trunk/ChangeLog
trunk/glade/workbench.glade
trunk/src/main.cc
trunk/src/workbench/nmv-workbench.cc
Modified: trunk/glade/workbench.glade
==============================================================================
--- trunk/glade/workbench.glade (original)
+++ trunk/glade/workbench.glade Fri Jan 18 10:08:47 2008
@@ -1,186 +1,95 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
<glade-interface>
-
-<widget class="GtkWindow" id="workbench">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Nemiver</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="default_width">800</property>
- <property name="default_height">600</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="urgency_hint">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="menucontainer">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="toolbarvbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkNotebook" id="toolbarcontainer">
- <property name="visible">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="emptytoolbar">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label1</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="bodybox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkNotebook" id="bodynotebook">
- <property name="visible">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="emptybody">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label2</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
+ <widget class="GtkWindow" id="workbench">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Nemiver</property>
+ <property name="default_width">800</property>
+ <property name="default_height">600</property>
+ <property name="destroy_with_parent">True</property>
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkVBox" id="menucontainer">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="toolbarvbox">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkNotebook" id="toolbarcontainer">
+ <property name="visible">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <widget class="GtkVBox" id="emptytoolbar">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label1</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="bodybox">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkNotebook" id="bodynotebook">
+ <property name="visible">True</property>
+ <property name="show_tabs">False</property>
+ <child>
+ <widget class="GtkVBox" id="emptybody">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label2</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
</glade-interface>
Modified: trunk/src/main.cc
==============================================================================
--- trunk/src/main.cc (original)
+++ trunk/src/main.cc Fri Jan 18 10:08:47 2008
@@ -409,7 +409,6 @@
//intercept ctrl-c/SIGINT
signal (SIGINT, sigint_handler) ;
- s_workbench->get_root_window ().show_all () ;
gtk_kit.run (s_workbench->get_root_window ()) ;
NEMIVER_CATCH_NOX
Modified: trunk/src/workbench/nmv-workbench.cc
==============================================================================
--- trunk/src/workbench/nmv-workbench.cc (original)
+++ trunk/src/workbench/nmv-workbench.cc Fri Jan 18 10:08:47 2008
@@ -525,17 +525,19 @@
m_priv->glade = Gnome::Glade::Xml::create (file_path) ;
THROW_IF_FAIL (m_priv->glade) ;
- m_priv->root_window.reset
- (ui_utils::get_widget_from_glade<Gtk::Window> (m_priv->glade,
- "workbench"));
- THROW_IF_FAIL (m_priv->root_window) ;
- // get the title of the root window as specified in the glade file and save
- // it so that later we can add state-specific extensions to this base title
- // if needed
+ Gtk::Widget *w =
+ ui_utils::get_widget_from_glade<Gtk::Window> (m_priv->glade,
+ "workbench");
+ THROW_IF_FAIL (w);
+ m_priv->root_window.reset (dynamic_cast<Gtk::Window*>
+ (w->get_toplevel ()));
+ THROW_IF_FAIL (m_priv->root_window);
+ //get the title of the toplevel window as specified in the
+ //glade file and save
+ //it so that later we can add state-specific
+ //extensions to this base title
+ //if needed
m_priv->base_title = m_priv->root_window->get_title ();
-
- // m_priv->root_window->property_allow_shrink ().set_value (true) ;
- m_priv->root_window->hide () ;
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]