[Lemon-commits] ladanyi: r3358 - glemon/branches/akos

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 5 10:31:09 CET 2007


Author: ladanyi
Date: Mon Nov  5 10:31:07 2007
New Revision: 3358

Modified:
   glemon/branches/akos/file_import_dialog.cc
   glemon/branches/akos/file_import_dialog.glade
   glemon/branches/akos/file_import_dialog.h
   glemon/branches/akos/mapstorage.cc

Log:
FileImportDialog improvements.

Modified: glemon/branches/akos/file_import_dialog.cc
==============================================================================
--- glemon/branches/akos/file_import_dialog.cc	(original)
+++ glemon/branches/akos/file_import_dialog.cc	Mon Nov  5 10:31:07 2007
@@ -2,12 +2,35 @@
 #include <gtkmm/dialog.h>
 #include <gtkmm/stock.h>
 
-FileImportDialog::FileImportDialog()
+FileImportDialog::FileImportDialog() :
+  rbNodeCoordOneMap(0),
+  rbNodeCoordTwoMaps(0),
+  rbArrowCoordOneMap(0),
+  rbArrowCoordTwoMaps(0),
+  cbNodeCoordOneMap(0),
+  cbNodeCoordTwoMaps1(0),
+  cbNodeCoordTwoMaps2(0),
+  cbArrowCoordOneMap(0),
+  cbArrowCoordTwoMaps1(0),
+  cbArrowCoordTwoMaps2(0)
 {
-  m_refXml = Gnome::Glade::Xml::create("file_import_dialog.glade");
-  m_refXml->reparent_widget("notebook1", *get_vbox());
+  refXml = Gnome::Glade::Xml::create("file_import_dialog.glade");
+  refXml->reparent_widget("notebook1", *get_vbox());
   add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
   add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
+
+  refXml->get_widget("radiobutton1", rbNodeCoordOneMap);
+  refXml->get_widget("radiobutton2", rbNodeCoordTwoMaps);
+  refXml->get_widget("radiobutton3", rbArrowCoordOneMap);
+  refXml->get_widget("radiobutton4", rbArrowCoordTwoMaps);
+
+  refXml->get_widget("combobox5", cbNodeCoordOneMap);
+  refXml->get_widget("combobox2", cbNodeCoordTwoMaps1);
+  refXml->get_widget("combobox1", cbNodeCoordTwoMaps2);
+
+  refXml->get_widget("combobox6", cbArrowCoordOneMap);
+  refXml->get_widget("combobox3", cbArrowCoordTwoMaps1);
+  refXml->get_widget("combobox4", cbArrowCoordTwoMaps2);
 }
 
 FileImportDialog::~FileImportDialog()

Modified: glemon/branches/akos/file_import_dialog.glade
==============================================================================
--- glemon/branches/akos/file_import_dialog.glade	(original)
+++ glemon/branches/akos/file_import_dialog.glade	Mon Nov  5 10:31:07 2007
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.2.0 on Fri Apr  6 17:40:32 2007 by akos at ragnarok-->
+<!--Generated with glade3 3.4.0 on Sun Nov  4 16:15:13 2007 -->
 <glade-interface>
   <widget class="GtkWindow" id="window1">
     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -24,7 +24,7 @@
                     <property name="visible">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="xalign">0</property>
-                    <property name="label" translatable="yes"><b>Node Position</b></property>
+                    <property name="label" translatable="yes"><b>Node Coordinates</b></property>
                     <property name="use_markup">True</property>
                   </widget>
                 </child>
@@ -58,6 +58,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                 <property name="label" translatable="yes">one map</property>
+                                <property name="response_id">0</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                                 <property name="group">radiobutton2</property>
@@ -125,6 +126,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                 <property name="label" translatable="yes">two maps</property>
+                                <property name="response_id">0</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                               </widget>
@@ -153,25 +155,15 @@
                                     <property name="column_spacing">12</property>
                                     <property name="row_spacing">6</property>
                                     <child>
-                                      <widget class="GtkLabel" id="label4">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="label" translatable="yes">X</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="x_options">GTK_FILL</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label3">
+                                      <widget class="GtkComboBox" id="combobox1">
                                         <property name="visible">True</property>
                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="label" translatable="yes">Y</property>
                                       </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>
-                                        <property name="x_options">GTK_FILL</property>
                                       </packing>
                                     </child>
                                     <child>
@@ -185,15 +177,25 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkComboBox" id="combobox1">
+                                      <widget class="GtkLabel" id="label3">
                                         <property name="visible">True</property>
                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="label" translatable="yes">Y</property>
                                       </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>
+                                        <property name="x_options">GTK_FILL</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkLabel" id="label4">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="label" translatable="yes">X</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="x_options">GTK_FILL</property>
                                       </packing>
                                     </child>
                                   </widget>
@@ -232,7 +234,7 @@
                     <property name="visible">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="xalign">0</property>
-                    <property name="label" translatable="yes"><b>Arrow Position</b></property>
+                    <property name="label" translatable="yes"><b>Arrow Coordinates</b></property>
                     <property name="use_markup">True</property>
                   </widget>
                 </child>
@@ -266,6 +268,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                 <property name="label" translatable="yes">one map</property>
+                                <property name="response_id">0</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                                 <property name="group">radiobutton4</property>
@@ -332,6 +335,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                 <property name="label" translatable="yes">two maps</property>
+                                <property name="response_id">0</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                               </widget>
@@ -360,25 +364,15 @@
                                     <property name="column_spacing">12</property>
                                     <property name="row_spacing">6</property>
                                     <child>
-                                      <widget class="GtkLabel" id="label7">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="label" translatable="yes">X</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="x_options">GTK_FILL</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label8">
+                                      <widget class="GtkComboBox" id="combobox4">
                                         <property name="visible">True</property>
                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="label" translatable="yes">Y</property>
                                       </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>
-                                        <property name="x_options">GTK_FILL</property>
                                       </packing>
                                     </child>
                                     <child>
@@ -392,15 +386,25 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkComboBox" id="combobox4">
+                                      <widget class="GtkLabel" id="label8">
                                         <property name="visible">True</property>
                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="label" translatable="yes">Y</property>
                                       </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>
+                                        <property name="x_options">GTK_FILL</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkLabel" id="label7">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="label" translatable="yes">X</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="x_options">GTK_FILL</property>
                                       </packing>
                                     </child>
                                   </widget>
@@ -434,9 +438,6 @@
               </packing>
             </child>
           </widget>
-          <packing>
-            <property name="tab_expand">False</property>
-          </packing>
         </child>
         <child>
           <widget class="GtkLabel" id="label9">
@@ -446,7 +447,6 @@
           </widget>
           <packing>
             <property name="type">tab</property>
-            <property name="tab_expand">False</property>
             <property name="tab_fill">False</property>
           </packing>
         </child>
@@ -459,7 +459,6 @@
           </widget>
           <packing>
             <property name="position">1</property>
-            <property name="tab_expand">False</property>
           </packing>
         </child>
         <child>
@@ -471,7 +470,6 @@
           <packing>
             <property name="type">tab</property>
             <property name="position">1</property>
-            <property name="tab_expand">False</property>
             <property name="tab_fill">False</property>
           </packing>
         </child>
@@ -484,7 +482,6 @@
           </widget>
           <packing>
             <property name="position">2</property>
-            <property name="tab_expand">False</property>
           </packing>
         </child>
         <child>
@@ -496,7 +493,6 @@
           <packing>
             <property name="type">tab</property>
             <property name="position">2</property>
-            <property name="tab_expand">False</property>
             <property name="tab_fill">False</property>
           </packing>
         </child>

Modified: glemon/branches/akos/file_import_dialog.h
==============================================================================
--- glemon/branches/akos/file_import_dialog.h	(original)
+++ glemon/branches/akos/file_import_dialog.h	Mon Nov  5 10:31:07 2007
@@ -3,11 +3,27 @@
 
 #include <libglademm/xml.h>
 #include <gtkmm/dialog.h>
+#include <gtkmm/radiobutton.h>
+#include <gtkmm/combobox.h>
 
 class FileImportDialog : public Gtk::Dialog
 {
   private:
-    Glib::RefPtr<Gnome::Glade::Xml> m_refXml;
+    Glib::RefPtr<Gnome::Glade::Xml> refXml;
+
+    Gtk::RadioButton* rbNodeCoordOneMap;
+    Gtk::RadioButton* rbNodeCoordTwoMaps;
+
+    Gtk::RadioButton* rbArrowCoordOneMap;
+    Gtk::RadioButton* rbArrowCoordTwoMaps;
+
+    Gtk::ComboBox* cbNodeCoordOneMap;
+    Gtk::ComboBox* cbNodeCoordTwoMaps1;
+    Gtk::ComboBox* cbNodeCoordTwoMaps2;
+
+    Gtk::ComboBox* cbArrowCoordOneMap;
+    Gtk::ComboBox* cbArrowCoordTwoMaps1;
+    Gtk::ComboBox* cbArrowCoordTwoMaps2;
   public:
     FileImportDialog();
     ~FileImportDialog();

Modified: glemon/branches/akos/mapstorage.cc
==============================================================================
--- glemon/branches/akos/mapstorage.cc	(original)
+++ glemon/branches/akos/mapstorage.cc	Mon Nov  5 10:31:07 2007
@@ -300,13 +300,6 @@
     use_gui_data_in_lgf = gui_data_in_lgf;
   }
 
-  /*
-  {
-    FileImportDialog fidialog;
-    fidialog.run();
-  }
-  */
-
   if (gui_data_found)
   {
     GUISectData gui_data;
@@ -572,6 +565,10 @@
   {
     // there is no gui section neither in the .lgf file nor in the .conf file
     // TODO
+    {
+      FileImportDialog fidialog;
+      fidialog.run();
+    }
   }
 
 



More information about the Lemon-commits mailing list