monkey-bubble r245 - in trunk: . data src/ui



Author: herzi
Date: Sat Jan 12 22:02:50 2008
New Revision: 245
URL: http://svn.gnome.org/viewvc/monkey-bubble?rev=245&view=rev

Log:
2008-01-12  Sven Herzberg  <herzi gnome-de org>

	Prepare the network game window for the maemo port.

	* data/netgame.glade,
	* src/ui/ui-network-client.c: modify the code and the glade file to
	work for GNOME and for Maemo


Modified:
   trunk/ChangeLog
   trunk/data/netgame.glade
   trunk/src/ui/ui-network-client.c

Modified: trunk/data/netgame.glade
==============================================================================
--- trunk/data/netgame.glade	(original)
+++ trunk/data/netgame.glade	Sat Jan 12 22:02:50 2008
@@ -422,6 +422,80 @@
 	      </child>
 
 	      <child>
+		<widget class="GtkButton" id="close_button">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment9">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">0</property>
+		      <property name="yscale">0</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">0</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox5">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">2</property>
+
+			  <child>
+			    <widget class="GtkImage" id="image9">
+			      <property name="visible">True</property>
+			      <property name="stock">gtk-quit</property>
+			      <property name="icon_size">4</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label9">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Close</property>
+			      <property name="use_underline">True</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>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
 		<widget class="GtkButton" id="ready_button">
 		  <property name="visible">True</property>
 		  <property name="can_focus">True</property>

Modified: trunk/src/ui/ui-network-client.c
==============================================================================
--- trunk/src/ui/ui-network-client.c	(original)
+++ trunk/src/ui/ui-network-client.c	Sat Jan 12 22:02:50 2008
@@ -117,9 +117,23 @@
 
         PRIVATE(ngl)->ready = FALSE;
 
+#ifdef GNOME
         PRIVATE(ngl)->glade_xml = glade_xml_new(DATADIR"/monkey-bubble/glade/netgame.glade","network_window",NULL);
         
         PRIVATE(ngl)->window = glade_xml_get_widget( PRIVATE(ngl)->glade_xml, "network_window");
+	gtk_widget_hide (glade_xml_get_widget (PRIVATE(ngl)->glade_xml, "close_button"));
+#endif
+#ifdef MAEMO
+	PRIVATE(ngl)->glade_xml = glade_xml_new(DATADIR"/monkey-bubble/glade/netgame.glade","vbox1",NULL);
+
+	PRIVATE(ngl)->window = gtk_dialog_new();
+	gtk_window_set_title(GTK_WINDOW(PRIVATE(ngl)->window), _("Network game"));
+	container = glade_xml_get_widget( PRIVATE(ngl)->glade_xml, "vbox1");
+	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(PRIVATE(ngl)->window)->vbox), container);
+	item = glade_xml_get_widget( PRIVATE(ngl)->glade_xml, "close_button");
+	g_signal_connect_swapped( item,"clicked",GTK_SIGNAL_FUNC(close_signal),ngl);
+	gtk_widget_set_size_request (glade_xml_get_widget (PRIVATE(ngl)->glade_xml, "scrolledwindow2"), -1, 298); // FIXME: check if necessary
+#endif
 
        
         item = glade_xml_get_widget( PRIVATE(ngl)->glade_xml, "go_button");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]