Import jumpnbump_menufeature/jumpnbump_menu
authorAnsgar Burchardt <ansgar-guest@alioth.debian.org>
Mon, 8 Dec 2008 00:49:51 +0000 (8 01:49 +0100)
committerAnsgar Burchardt <ansgar-guest@alioth.debian.org>
Mon, 8 Dec 2008 18:52:23 +0000 (8 19:52 +0100)
Source: Debian Etch (http://packages.debian.org/etch/jumpnbump)

contrib/jumpnbump_menu/AUTHOR [new file with mode: 0644]
contrib/jumpnbump_menu/Makefile [new file with mode: 0644]
contrib/jumpnbump_menu/NEWS [new file with mode: 0644]
contrib/jumpnbump_menu/README [new file with mode: 0644]
contrib/jumpnbump_menu/TODO [new file with mode: 0644]
contrib/jumpnbump_menu/jumpnbump_menu.glade [new file with mode: 0644]
contrib/jumpnbump_menu/jumpnbump_menu.py [new file with mode: 0644]

diff --git a/contrib/jumpnbump_menu/AUTHOR b/contrib/jumpnbump_menu/AUTHOR
new file mode 100644 (file)
index 0000000..55402c4
--- /dev/null
@@ -0,0 +1 @@
+Martin Willemoes Hansen <mwh@sysrq.dk>
diff --git a/contrib/jumpnbump_menu/Makefile b/contrib/jumpnbump_menu/Makefile
new file mode 100644 (file)
index 0000000..454c5e2
--- /dev/null
@@ -0,0 +1,11 @@
+PREFIX=/usr
+
+all:
+       @echo "This software is interpreted, no compilation needed"
+install:
+       cp jumpnbump_menu.glade $(PREFIX)/share/games/jumpnbump/
+       cp jumpnbump_menu.py $(PREFIX)/games/
+
+uninstall:
+       rm $(PREFIX)/share/games/jumpnbump/jumpnbump_menu.glade
+       rm $(PREFIX)/games/jumpnbump_menu.py
diff --git a/contrib/jumpnbump_menu/NEWS b/contrib/jumpnbump_menu/NEWS
new file mode 100644 (file)
index 0000000..a5d64eb
--- /dev/null
@@ -0,0 +1,27 @@
+0.6
+===
+o A couple of HIG issues where fixed.
+
+0.5
+===
+o GUI fixes.
+
+0.4
+===
+o Level preview implemented
+
+0.3
+===
+o UI tweaks.
+o jumpbump.dat is default level
+o Path to levels and binary has changed.
+
+0.2
+===
+o Added Makefile for installing/uninstalling
+o Fixed mirror checkbox.
+o Does not have to be run from shell.
+
+0.1
+===
+o Initial release.
diff --git a/contrib/jumpnbump_menu/README b/contrib/jumpnbump_menu/README
new file mode 100644 (file)
index 0000000..46dfb88
--- /dev/null
@@ -0,0 +1,16 @@
+Edit the Makefile to your liking.
+Also check the variables in the top of the python script.
+
+Then run
+make install
+
+====
+reqs
+====
+
+Python-2.2.1
+pygtk-1.99.13
+ImageMagick-5.4.6
+jumpnbump-1.39
+
+At least thats what I have ;)
diff --git a/contrib/jumpnbump_menu/TODO b/contrib/jumpnbump_menu/TODO
new file mode 100644 (file)
index 0000000..a47100d
--- /dev/null
@@ -0,0 +1,4 @@
+o Enable a kill server. (it tends to lock)
+o Refactor level preview
+o Make jumpbump.dat the default level
+
diff --git a/contrib/jumpnbump_menu/jumpnbump_menu.glade b/contrib/jumpnbump_menu/jumpnbump_menu.glade
new file mode 100644 (file)
index 0000000..5f793c0
--- /dev/null
@@ -0,0 +1,870 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="main">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Jump n Bump menu</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <signal name="delete_event" handler="quit" last_modification_time="Sun, 25 Aug 2002 14:53:02 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox1">
+      <property name="border_width">5</property>
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">5</property>
+
+      <child>
+       <widget class="GtkFrame" id="frame6">
+         <property name="visible">True</property>
+         <property name="label_xalign">0</property>
+         <property name="label_yalign">0.5</property>
+         <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+         <child>
+           <widget class="GtkHBox" id="hbox8">
+             <property name="border_width">5</property>
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">5</property>
+
+             <child>
+               <widget class="GtkRadioButton" id="standalone">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">_Standalone</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <signal name="toggled" handler="standalone_mode" last_modification_time="Wed, 28 Aug 2002 12:46:13 GMT"/>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="fireworks">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">_Fireworks</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">standalone</property>
+                 <signal name="toggled" handler="fireworks_mode" last_modification_time="Wed, 28 Aug 2002 12:46:22 GMT"/>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="client">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">_Client</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">standalone</property>
+                 <signal name="toggled" handler="client_mode" last_modification_time="Wed, 28 Aug 2002 12:46:31 GMT"/>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="server">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">Ser_ver</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">standalone</property>
+                 <signal name="toggled" handler="server_mode" last_modification_time="Wed, 28 Aug 2002 12:46:41 GMT"/>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label15">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Mode</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>
+           </widget>
+           <packing>
+             <property name="type">label_item</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkHBox" id="hbox9">
+         <property name="border_width">5</property>
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">5</property>
+
+         <child>
+           <widget class="GtkScrolledWindow" id="scrolledwindow1">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+             <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+             <property name="shadow_type">GTK_SHADOW_NONE</property>
+             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+             <child>
+               <widget class="GtkTreeView" id="level_treeview">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="headers_visible">True</property>
+                 <property name="rules_hint">False</property>
+                 <property name="reorderable">False</property>
+                 <property name="enable_search">True</property>
+                 <signal name="cursor_changed" handler="level_changed" last_modification_time="Tue, 03 Sep 2002 21:46:46 GMT"/>
+               </widget>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkImage" id="image">
+             <property name="width_request">200</property>
+             <property name="height_request">128</property>
+             <property name="visible">True</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">True</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkFrame" id="frame4">
+         <property name="visible">True</property>
+         <property name="label_xalign">0</property>
+         <property name="label_yalign">0.5</property>
+         <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+         <child>
+           <widget class="GtkTable" id="table3">
+             <property name="border_width">5</property>
+             <property name="visible">True</property>
+             <property name="n_rows">2</property>
+             <property name="n_columns">2</property>
+             <property name="homogeneous">False</property>
+             <property name="row_spacing">5</property>
+             <property name="column_spacing">5</property>
+
+             <child>
+               <widget class="GtkHBox" id="hbox7">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">5</property>
+
+                 <child>
+                   <widget class="GtkEntry" id="server_entry">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="tooltip" translatable="yes">Remote server ip/name</property>
+                     <property name="can_focus">True</property>
+                     <property name="editable">True</property>
+                     <property name="visibility">True</property>
+                     <property name="max_length">0</property>
+                     <property name="text" translatable="yes"></property>
+                     <property name="has_frame">True</property>
+                     <property name="invisible_char" translatable="yes">*</property>
+                     <property name="activates_default">False</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">True</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkSpinButton" id="player_num">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="tooltip" translatable="yes">Your are player number?</property>
+                     <property name="can_focus">True</property>
+                     <property name="climb_rate">1</property>
+                     <property name="digits">0</property>
+                     <property name="numeric">False</property>
+                     <property name="update_policy">GTK_UPDATE_IF_VALID</property>
+                     <property name="snap_to_ticks">False</property>
+                     <property name="wrap">True</property>
+                     <property name="adjustment">2 1 3 1 10 10</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label5">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">_Number of remote clients:</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</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="mnemonic_widget">num_of_clients</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">0</property>
+                 <property name="bottom_attach">1</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label6">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Rem_ote server:</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</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="mnemonic_widget">server_entry</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkAlignment" id="alignment8">
+                 <property name="visible">True</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xscale">0</property>
+                 <property name="yscale">1</property>
+
+                 <child>
+                   <widget class="GtkSpinButton" id="num_of_clients">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="can_focus">True</property>
+                     <property name="climb_rate">1</property>
+                     <property name="digits">0</property>
+                     <property name="numeric">False</property>
+                     <property name="update_policy">GTK_UPDATE_IF_VALID</property>
+                     <property name="snap_to_ticks">False</property>
+                     <property name="wrap">True</property>
+                     <property name="adjustment">1 1 3 1 10 10</property>
+                   </widget>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">0</property>
+                 <property name="bottom_attach">1</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label13">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Network</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>
+           </widget>
+           <packing>
+             <property name="type">label_item</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkHBox" id="hbox6">
+         <property name="visible">True</property>
+         <property name="homogeneous">True</property>
+         <property name="spacing">5</property>
+
+         <child>
+           <widget class="GtkFrame" id="frame2">
+             <property name="visible">True</property>
+             <property name="label_xalign">0</property>
+             <property name="label_yalign">0.5</property>
+             <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox3">
+                 <property name="border_width">5</property>
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <widget class="GtkCheckButton" id="fullscreen">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">Fullscr_een</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkCheckButton" id="nogore">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">No _gore</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkCheckButton" id="double_res">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">_Double resolution</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkCheckButton" id="mirror">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">_Mirror level</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+               </widget>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label11">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Graphics</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>
+               </widget>
+               <packing>
+                 <property name="type">label_item</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkFrame" id="frame3">
+             <property name="visible">True</property>
+             <property name="label_xalign">0</property>
+             <property name="label_yalign">0.5</property>
+             <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox4">
+                 <property name="border_width">5</property>
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <widget class="GtkCheckButton" id="nosound">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">No so_und</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkCheckButton" id="noflies">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">No f_lies</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkCheckButton" id="withmusic">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">_With music but without sound.</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+               </widget>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label12">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Sound</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>
+               </widget>
+               <packing>
+                 <property name="type">label_item</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">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkHButtonBox" id="hbuttonbox1">
+         <property name="border_width">5</property>
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkButton" id="button1">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-quit</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <signal name="clicked" handler="quit" last_modification_time="Sun, 25 Aug 2002 15:11:35 GMT"/>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="button2">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <signal name="clicked" handler="run" last_modification_time="Sun, 25 Aug 2002 15:16:22 GMT"/>
+
+             <child>
+               <widget class="GtkAlignment" id="alignment4">
+                 <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>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox3">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">2</property>
+
+                     <child>
+                       <widget class="GtkImage" id="image1">
+                         <property name="visible">True</property>
+                         <property name="stock">gtk-apply</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="label7">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">_Run</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>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="button3">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label" translatable="yes">_About</property>
+             <property name="use_underline">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <signal name="clicked" handler="about" last_modification_time="Sun, 25 Aug 2002 15:16:30 GMT"/>
+           </widget>
+         </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="about">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">About</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox2">
+      <property name="border_width">5</property>
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">5</property>
+
+      <child>
+       <widget class="GtkEntry" id="entry3">
+         <property name="visible">True</property>
+         <property name="can_focus">True</property>
+         <property name="editable">False</property>
+         <property name="visibility">True</property>
+         <property name="max_length">0</property>
+         <property name="text" translatable="yes">Jump n Bump menu 0.6</property>
+         <property name="has_frame">True</property>
+         <property name="invisible_char" translatable="yes">*</property>
+         <property name="activates_default">False</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="label8">
+         <property name="visible">True</property>
+         <property name="label" translatable="yes">Copyright (c) 2002 Martin Willemoes Hansen &lt;mwh@sysrq.dk&gt;
+
+Jump n Bump starter.
+
+Gtk+ and Python rocks!!</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>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkHSeparator" id="hseparator3">
+         <property name="visible">True</property>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkHButtonBox" id="hbuttonbox2">
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_END</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkButton" id="button4">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <signal name="clicked" handler="ok" last_modification_time="Sun, 25 Aug 2002 16:03:43 GMT"/>
+
+             <child>
+               <widget class="GtkAlignment" id="alignment5">
+                 <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>
+
+                 <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="image2">
+                         <property name="visible">True</property>
+                         <property name="stock">gtk-ok</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">_Ok</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>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/contrib/jumpnbump_menu/jumpnbump_menu.py b/contrib/jumpnbump_menu/jumpnbump_menu.py
new file mode 100644 (file)
index 0000000..d9e25ce
--- /dev/null
@@ -0,0 +1,217 @@
+#!/usr/bin/env python
+
+# Author: Martin Willemoes Hansen
+# License: Gnu GPL
+
+# Next two lines are a workaround for Debian bug 163794
+import sys
+
+import pygtk
+pygtk.require('2.0')
+import gtk
+import gtk.glade
+import gtk.gdk
+import gobject
+import os
+import tempfile
+import shutil
+
+RESOURCE_DIR='/usr/share/games/jumpnbump'
+BINARY_DIR='/usr/games'
+
+def populate_treeview():
+    levels = []
+    for file in os.listdir (RESOURCE_DIR):
+        if (file.endswith ('.dat')):
+            levels.append (file)
+
+    levels.sort()
+
+    COLUMN_LEVEL = 0
+    store = gtk.ListStore (gobject.TYPE_STRING)
+
+    for level in levels:
+        iter = store.append()
+        store.set (iter, COLUMN_LEVEL, level)
+                        
+    treeview.set_model (store)
+
+    renderer = gtk.CellRendererText()
+    treeview.append_column (gtk.TreeViewColumn ('Level', renderer, text=COLUMN_LEVEL))
+
+def standalone_mode (widget):
+    disable_enable_level (1)
+    disable_enable_server (0)
+    num_clients.set_sensitive (0)
+    nogore.set_sensitive (1)
+    noflies.set_sensitive (1)
+
+def client_mode (widget):
+    disable_enable_level (1)
+    disable_enable_server (1)
+    num_clients.set_sensitive (0)
+    nogore.set_sensitive (1)
+    noflies.set_sensitive (1)
+
+def server_mode (widget):
+    disable_enable_level (1)
+    disable_enable_server (0)
+    num_clients.set_sensitive (1)
+    nogore.set_sensitive (1)
+    noflies.set_sensitive (1)
+
+def fireworks_mode (widget):
+    disable_enable_level (0)
+    disable_enable_server (0)
+    nogore.set_sensitive (0)
+    nogore.set_active (0)
+    noflies.set_sensitive (0)
+    noflies.set_active (0)
+
+def disable_enable_server (setting):
+    server_entry.set_sensitive (setting)
+    player_num.set_sensitive (setting)
+
+def disable_enable_level (setting):
+    treeview.set_sensitive (setting)
+    mirror.set_sensitive (setting)
+    if (not setting):
+        mirror.set_active (setting)
+
+def level_changed (widget):
+    model, iter = treeview.get_selection().get_selected()
+    global choosen_level
+    choosen_level = '%s/%s' % (RESOURCE_DIR, model.get_value (iter, 0))
+    unpackdir = None
+    try:
+        unpackdir = tempfile.mkdtemp ("", "jumpnbump-menu-")
+        os.chdir  (unpackdir)
+        os.spawnlp (os.P_WAIT, 'jumpnbump-unpack', 'jumpnbump', choosen_level)
+        os.spawnlp (os.P_WAIT, 'convert', 'convert', '-scale', '50%', 'level.pcx', 'level_scaled.pcx')
+        os.spawnlp (os.P_WAIT, 'convert', 'convert', 'level_scaled.pcx', 'level.png')
+        image.set_from_file ('level.png')
+    except Exception, err:
+        print err
+    if unpackdir != None:
+        shutil.rmtree (unpackdir)
+
+    image.show()
+
+def about (widget):
+    global about_dialog
+
+    if (not about_dialog):
+        gui = gtk.glade.XML (gladefile, 'about')
+        about_dialog = gui.get_widget ('about')
+        gui.signal_connect ('ok', about_close)
+
+def about_close (widget):
+    global about_dialog
+
+    about_dialog.destroy()
+    about_dialog = None
+
+def run (widget):
+    if (standalone.get_active()):
+        execute (*get_level()+common_options())
+    elif (fireworks.get_active()):
+        execute ('-fireworks', *common_options())
+    elif (client.get_active()):
+        execute ('-player', str (player_num.get_value_as_int()),
+                 '-connect', server_entry.get_text(),
+                 *get_level() + common_options())
+    else:
+        execute ('-server', str (num_clients.get_value_as_int()),
+                 *get_level() + common_options())
+
+def get_level():
+    level = []
+    if (mirror.get_active()):
+        level.append ('-mirror')
+    else:
+        level.append ('-dat')
+        level.append (choosen_level)
+
+    return level
+
+def common_options():
+    options = []
+
+    if (fullscreen.get_active()):
+        options.append ('-fullscreen')
+    if (nogore.get_active()):
+        options.append ('-nogore')
+    if (double_res.get_active()):
+        options.append ('-scaleup')
+    if (nosound.get_active()):
+        options.append ('-nosound')
+    if (noflies.get_active()):
+        options.append ('-noflies')
+    if (withmusic.get_active()):
+        options.append ('-musicnosound')
+    if (mirror.get_active()):
+        options.append ('-mirror')
+
+    return options
+
+def execute (*cmd):
+    try:
+        os.spawnl (os.P_NOWAIT, BINARY_DIR + '/jumpnbump', 'jumpnbump', *cmd)
+    except Exception, err:
+        print err
+
+def main():
+    global gladefile
+
+    global_gladefile = RESOURCE_DIR + '/jumpnbump_menu.glade'
+    local_gladefile = './jumpnbump_menu.glade'
+
+    if (os.access (global_gladefile, os.R_OK)):
+        gladefile = global_gladefile
+        del local_gladefile
+    elif (os.access (local_gladefile, os.R_OK)):
+        gladefile = local_gladefile
+        del global_gladefile
+    else:
+        print 'Could not find the glade file'
+        return 0
+
+    gui = gtk.glade.XML (gladefile, 'main')
+
+    global about_dialog, choosen_level, standalone, fireworks, client, server, treeview, \
+           mirror, num_clients, server_entry, player_num, fullscreen, \
+           nogore, double_res, nosound, noflies, withmusic, image
+
+    about_dialog = None
+    choosen_level = ''
+    standalone = gui.get_widget ('standalone')
+    fireworks = gui.get_widget ('fireworks')
+    client = gui.get_widget ('client')
+    server = gui.get_widget ('server')
+    treeview = gui.get_widget ('level_treeview')
+    populate_treeview()
+    mirror = gui.get_widget ('mirror')
+    num_clients = gui.get_widget ('num_of_clients')
+    server_entry = gui.get_widget ('server_entry')
+    player_num = gui.get_widget ('player_num')
+    fullscreen = gui.get_widget ('fullscreen')
+    nogore = gui.get_widget ('nogore')
+    double_res = gui.get_widget ('double_res')
+    nosound = gui.get_widget ('nosound')
+    noflies = gui.get_widget ('noflies')
+    withmusic = gui.get_widget ('withmusic')
+    image = gui.get_widget ('image')
+    
+    gui.signal_autoconnect ({'standalone_mode': standalone_mode,
+                             'client_mode': client_mode,
+                             'server_mode': server_mode,
+                             'fireworks_mode': fireworks_mode,
+                             'level_changed': level_changed, 
+                             'quit': lambda *args: gtk.main_quit(),
+                             'run': run,
+                             'about': about})
+    
+    gtk.main()
+
+if __name__ == '__main__':
+    main()