]> git.llucax.com Git - z.facultad/75.42/plaqui.git/commitdiff
* Se completa el diaglo "Acerca de" del cliente
authorRicardo Markiewicz <gazer.arg@gmail.com>
Mon, 1 Dec 2003 06:58:21 +0000 (06:58 +0000)
committerRicardo Markiewicz <gazer.arg@gmail.com>
Mon, 1 Dec 2003 06:58:21 +0000 (06:58 +0000)
Client/dialogs/client.glade
Client/include/principal.h
Client/pixmaps/Makefile.am
Client/pixmaps/logo.png
Client/src/principal.cpp

index 15a75383e134b74b08b61fcad5a52e7fd8f04db8..4f1e081bd0deb43e997fdc66f110a8e672579bf4 100644 (file)
   </child>
 </widget>
 
-<widget class="GtkWindow" id="dlgAbout">
-  <property name="title" translatable="yes">Acerca de ...</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_CENTER</property>
-  <property name="modal">True</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-
-  <child>
-    <widget class="GtkVBox" id="vbox2">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-       <widget class="GtkNotebook" id="notebook1">
-         <property name="visible">True</property>
-         <property name="can_focus">True</property>
-         <property name="show_tabs">True</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="GtkImage" id="image2">
-             <property name="visible">True</property>
-             <property name="pixbuf">logo.png</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="tab_expand">False</property>
-             <property name="tab_fill">True</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkLabel" id="label6">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">PlaQui</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">tab</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkScrolledWindow" id="scrolledwindow2">
-             <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="GtkTextView" id="txt_changelog">
-                 <property name="visible">True</property>
-                 <property name="can_focus">True</property>
-                 <property name="editable">False</property>
-                 <property name="justification">GTK_JUSTIFY_LEFT</property>
-                 <property name="wrap_mode">GTK_WRAP_NONE</property>
-                 <property name="cursor_visible">False</property>
-                 <property name="pixels_above_lines">0</property>
-                 <property name="pixels_below_lines">0</property>
-                 <property name="pixels_inside_wrap">0</property>
-                 <property name="left_margin">0</property>
-                 <property name="right_margin">0</property>
-                 <property name="indent">0</property>
-                 <property name="text" translatable="yes"></property>
-               </widget>
-             </child>
-           </widget>
-           <packing>
-             <property name="tab_expand">False</property>
-             <property name="tab_fill">True</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkLabel" id="label7">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">ChangeLog</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">tab</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="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="btn_close">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-close</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <signal name="clicked" handler="gtk_widget_destroy" object="dlgAbout" last_modification_time="Thu, 16 Oct 2003 01:28:57 GMT"/>
-           </widget>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">True</property>
-       </packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
 <widget class="GtkDialog" id="dlgConectar">
   <property name="title" translatable="yes">Conectar</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   </child>
 </widget>
 
+<widget class="GtkDialog" id="dlgAbout">
+  <property name="title" translatable="yes">Acerca de ...</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox3">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+       <widget class="GtkHButtonBox" id="dialog-action_area3">
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+         <child>
+           <widget class="GtkButton" id="close_about">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="has_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-close</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="response_id">-7</property>
+             <signal name="clicked" handler="gtk_widget_hide" last_modification_time="Mon, 01 Dec 2003 06:35:10 GMT"/>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">True</property>
+         <property name="pack_type">GTK_PACK_END</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkNotebook" id="notebook1">
+         <property name="visible">True</property>
+         <property name="can_focus">True</property>
+         <property name="show_tabs">True</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="GtkImage" id="plaqui_logo">
+             <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="tab_expand">False</property>
+             <property name="tab_fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label6">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">PlaQui</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">tab</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>
+
 </glade-interface>
index f93cb78d1d2b1347fae2934073bcecffea961b2f..4653404fe9c182d2e5257272d84ababa67dd38e0 100644 (file)
@@ -58,7 +58,7 @@ protected:
 
        // Para la actualizacion automatica
        ViewItem *last_selected;
-       // Dialogo de Conectar
+       Gtk::Dialog *dlg_about;
        DlgConectar *dlg_conectar;
        DlgProperty *dlg_property;
        Gtk::TextView *txt_view;
index f7489ce54b7262e5a22d2fbbeced034dd6ecc484..5f08943a6da14db5e1341d346037b47542091b1a 100644 (file)
@@ -1,6 +1,7 @@
 plaquidir = $(datadir)/plaqui-client/pixmaps
 
 plaqui_DATA = \
+logo.png \
 and_e.png \
 and_n.png \
 and_o.png \
index 4d157cdda3c8416251062a30f4bf7c73dde4e1f6..ce2ddc43727dad3b67ed7793efcc6bb3ced5cea1 100644 (file)
Binary files a/Client/pixmaps/logo.png and b/Client/pixmaps/logo.png differ
index 8b47e56ddcc563695f934eddcb38996572cc6e20..3a9bfe40fe287cb2ebb229401386d4d42ff8a4f2 100644 (file)
@@ -21,7 +21,8 @@
 Principal::Principal(BaseObjectType *co, const Glib::RefPtr<Gnome::Glade::Xml> &rg):Gtk::Window(co),refXml(rg)
 {
        Gtk::MenuItem *conect=0, *exit=0, *about=0, *mnu_prop=0, *mnu_disconnect=0, *server_stop=0;
-       Gtk::Button *bar_connect=0;
+       Gtk::Button *bar_connect=0, *close_about=0;
+       Gtk::Image *plaqui_logo;
        txt_view = 0;
        work_place = 0;
        lbl_cap_flujo = lbl_cap_extra = lbl_extra = lbl_nombre = lbl_color = lbl_flujo = 0;
@@ -37,10 +38,15 @@ Principal::Principal(BaseObjectType *co, const Glib::RefPtr<Gnome::Glade::Xml> &
        anim_frames[7] = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/anim_7.png");
        current_frame = 0;
 
-       anim = 0;
+       plaqui_logo = anim = 0;
+       rg->get_widget("plaqui_logo", plaqui_logo);
+       plaqui_logo->set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/logo.png");
+
        rg->get_widget("anim_frames", anim);
        anim->set(anim_frames[current_frame]);
 
+       rg->get_widget("close_about", close_about);
+       rg->get_widget("dlgAbout", dlg_about);
        rg->get_widget("btn_pausa", btn_pause);
        rg->get_widget("btn_simular", btn_simulate);
        rg->get_widget("btn_activar", btn_activar);
@@ -76,6 +82,7 @@ Principal::Principal(BaseObjectType *co, const Glib::RefPtr<Gnome::Glade::Xml> &
        btn_activar->signal_clicked().connect( SigC::slot(*this, &Principal::on_btn_activar_clicked) );
        btn_simulate->signal_clicked().connect( SigC::slot(*this, &Principal::on_btn_simulate_clicked) );
        btn_pause->signal_clicked().connect( SigC::slot(*this, &Principal::on_btn_pause_clicked) );
+       close_about->signal_clicked().connect( SigC::slot(*dlg_about, &Gtk::Widget::hide) );
        
        conexion = NULL;
        is_xml_loaded = false;
@@ -257,34 +264,7 @@ void Principal::on_mnu_file_connect()
 
 void Principal::on_mnu_help_about()
 {
-       // preparo para leer el archivo ChangeLog
-/*     Glib::RefPtr<Gnome::Glade::Xml> xml;
-       Glib::ustring line;
-       Glib::RefPtr<Gtk::TextBuffer> log_buffer;
-       Glib::RefPtr<Glib::IOChannel> log_io;
-
-       log_buffer = Gtk::TextBuffer::create();
-       log_io = Glib::IOChannel::create_from_file("../ChangeLog", "r");
-       while (log_io->read_line(line) != Glib::IO_STATUS_EOF) {
-               log_buffer->insert_at_cursor(line);
-       }
-
-       try {
-               xml = Gnome::Glade::Xml::create("client.glade", "dlgAbout");
-       }
-       catch(const Gnome::Glade::XmlError &ex) {
-               std::cerr << ex.what() << std::endl;
-               return;
-       }
-       Gtk::Window *dlg = 0;
-       Gtk::Button *btn_cerrar = 0;
-       Gtk::TextView *txt_changelog = 0;
-       xml->get_widget("dlgAbout", dlg);
-       xml->get_widget("btn_close", btn_cerrar);
-       xml->get_widget("txt_changelog", txt_changelog);
-       btn_cerrar->signal_clicked().connect(SigC::slot(*dlg, &Gtk::Dialog::hide));
-       txt_changelog->set_buffer(log_buffer);
-       dlg->show();*/
+       dlg_about->run();
 }
 
 bool Principal::on_item_clicked(GdkEventButton *e, ViewItem *i)