]> granicus.if.org Git - graphviz/commitdiff
gvpr output window ,settings window Apply button ,fe wbugs cleaned up
authorarif <devnull@localhost>
Mon, 20 Jul 2009 16:46:04 +0000 (16:46 +0000)
committerarif <devnull@localhost>
Mon, 20 Jul 2009 16:46:04 +0000 (16:46 +0000)
cmd/smyrna/gui/beacon.c
cmd/smyrna/gui/menucallbacks.c
cmd/smyrna/gui/topviewsettings.c
cmd/smyrna/gui/topviewsettings.h
cmd/smyrna/gvprpipe.c
cmd/smyrna/topview.c
share/gui/smyrna.glade

index eca98c44c3417a40a101943d6b810c688404f50b..bfca0288ef01eddfa6723c13224c664ab5605b90 100644 (file)
@@ -257,9 +257,6 @@ int draw_node_hint_boxes(void)
                glVertex3f(x2,y2,z2);
 
 
-               /*blue font color*/
-               glprintfglut (GLUT_BITMAP_HELVETICA_12, dx,dy,dz,"[");
-               glprintfglut (GLUT_BITMAP_HELVETICA_12, dx,(dy+fs+fs/(GLfloat)5.0),dz,lbl);
     }
        glEnd();
        glLineWidth(0);
index 7e1d9a23b20a91c32bbfcec31ed2b6892992dfdf..4a5c7c6ce3f762351c1a638d25887bfc22ca5173 100755 (executable)
@@ -578,23 +578,27 @@ on_gvprbuttonload_clicked(GtkWidget * widget, gpointer user_data)
     agxbinit (&xbuf, SMALLBUF, xbuffer);
 
        /*file name should be returned in xbuf*/
-    if (openfiledlg(0,NULL,&xbuf)) {
-       input_file = fopen(agxbuse (&xbuf), "r");
-       if (input_file) {
-           while (fgets(buf, BUFSIZ, input_file)) { 
-               agxbput (&xbuf, buf);
-           }
-           gtkbuf = gtk_text_view_get_buffer((GtkTextView*) glade_xml_get_widget(xml,"gvprtextinput"));
-           str=agxbuse (&xbuf);
-           if(g_utf8_validate(str,-1,NULL)) {
-               gtk_text_buffer_set_text (gtkbuf, str, -1);
-           }
-           else {
-               show_gui_warning ("File format is not UTF8!");
-           }
-           fclose (input_file);
+    if (openfiledlg(0,NULL,&xbuf)) 
+       {
+               input_file = fopen(agxbuse (&xbuf), "r");
+               if (input_file) 
+               {
+                       while (fgets(buf, BUFSIZ, input_file)) 
+                               agxbput (&xbuf, buf);
+                       gtkbuf = gtk_text_view_get_buffer((GtkTextView*) glade_xml_get_widget(xml,"gvprtextinput"));
+                       str=agxbuse (&xbuf);
+                       if(g_utf8_validate(str,-1,NULL)) 
+                       {
+                               gtk_text_buffer_set_text (gtkbuf, str, -1);
+                       }
+                       else 
+                       {
+                               show_gui_warning ("File format is not UTF8!");
+                       }
+                       fclose (input_file);
        }
-       else {
+       else 
+       {
            show_gui_warning ("file couldn't be opened\n");
        }
     }
index 3f956ad5b36f61f8e83cd96faf18738fcd2aa1d8..4b8855a5a5891f773e979eb3775366a26eca6cf7 100644 (file)
 #include "memory.h"
 
 void on_settingsOKBtn_clicked(GtkWidget * widget, gpointer user_data)
+{
+       on_settingsApplyBtn_clicked (widget,user_data);
+       gtk_widget_hide(glade_xml_get_widget(xml, "dlgSettings"));
+}
+void on_settingsApplyBtn_clicked(GtkWidget * widget, gpointer user_data)
+
 {
     update_graph_from_settings(view->g[view->activeGraph]);
     set_viewport_settings_from_template(view, view->g[view->activeGraph]);
        settvcolorinfo(view->g[view->activeGraph],view->Topview);
-       gtk_widget_hide(glade_xml_get_widget(xml, "dlgSettings"));
 }
 
+
 void on_settingsCancelBtn_clicked(GtkWidget * widget, gpointer user_data)
 {
     gtk_widget_hide(glade_xml_get_widget(xml, "dlgSettings"));
index a3bbc1c882e1b8746e5088f925964ca59e0021bf..d58d39610baddfe64f3bd8a4bfee73d1f128a03f 100644 (file)
@@ -19,8 +19,9 @@
 #include "smyrnadefs.h"
 
 _BB void on_settingsOKBtn_clicked(GtkWidget * widget, gpointer user_data);
-_BB void on_settingsCancelBtn_clicked(GtkWidget * widget,
-                                     gpointer user_data);
+_BB void on_settingsCancelBtn_clicked(GtkWidget * widget,gpointer user_data);
+_BB void on_settingsApplyBtn_clicked(GtkWidget * widget, gpointer user_data);
+
 extern int load_settings_from_graph(Agraph_t * g);
 extern int update_graph_from_settings(Agraph_t * g);
 extern int show_settings_form();
index c7105b7aaea861fbc3a1bfdd6405a14be50b56d7..65ceeeb7275bcc78ef65e87ddceac789c64be113 100644 (file)
 #include <stdlib.h>
 #include <assert.h>
 #include <glade/glade.h>
+#include <gtk/gtk.h>
+#include "draw.h"
 
 //#include <viewport.h> 
 //#include <gltemplate.h> 
 
 #include <gvpr.h>
-
+extern GladeXML *xml;                  //global libglade vars
 static ssize_t outfn (void* sp, const char *buf, size_t nbyte, void* dp)
 {
-    return write (1, buf, nbyte);
+    GtkTextIter endit;
+    GtkTextBuffer * gtkbuf;
+       /*get text view buffer*/
+       gtkbuf = gtk_text_view_get_buffer((GtkTextView*) glade_xml_get_widget(xml,"gvprtextoutput"));
+       /*set iterator to the end of the buffer*/
+    gtk_text_buffer_get_end_iter (gtkbuf,&endit);
+       /*insert buf to the end*/
+       gtk_text_buffer_insert(gtkbuf,&endit,buf,nbyte);
+       return nbyte;
 }
 
 static ssize_t errfn (void* sp, const char *buf, size_t nbyte, void* dp)
@@ -36,6 +46,9 @@ static ssize_t errfn (void* sp, const char *buf, size_t nbyte, void* dp)
     return write (2, buf, nbyte);
 }
 
+
+
+
 int run_gvpr (Agraph_t* srcGraph, int argc, char* argv[])
 {
     int i, rv = 1;
@@ -50,16 +63,18 @@ int run_gvpr (Agraph_t* srcGraph, int argc, char* argv[])
     opts.out = outfn;
     opts.err = errfn;
     opts.flags = GV_USE_OUTGRAPH;
-    
+   
     rv = gvpr (argc, argv, &opts);
 
     if (rv) {  /* error */
-       fprintf (stderr, "Error in gvpr\n");
+               fprintf (stderr, "Error in gvpr\n");
     }
-    else if (opts.n_outgraphs) {
-       refreshViewport (0);
-       sprintf (buf, "<%d>", ++count);
-       add_graph_to_viewport(opts.outgraphs[0], buf);
+    else if (opts.n_outgraphs) 
+       {
+               refreshViewport (0);
+               sprintf (buf, "<%d>", ++count);
+               if (opts.outgraphs[0] != view->g[view->activeGraph])
+                       add_graph_to_viewport(opts.outgraphs[0], buf);
        if (opts.n_outgraphs > 1)
            fprintf (stderr, "Warning: multiple output graphs-discarded\n"); 
        for (i = 1; i < opts.n_outgraphs; i++) {
index eddee0d72a2c7aa24c6a770bb8f85439740e58f9..f62c21ad5ff4b4d29c526d1a9225ab57e750f051 100755 (executable)
@@ -762,7 +762,7 @@ void drawTopViewGraph(Agraph_t * g)
     drawtopviewedges(g);
        drawtopviewedgelabels(g);
        enddrawcycle(g);
-       draw_xdot_set(view->Topview->xdot_list);
+//     draw_xdot_set(view->Topview->xdot_list);
        draw_node_hint_boxes();
     if ((view->Selection.Active > 0) && (!view->SignalBlock)) {
        view->Selection.Active = 0;
index 640e945eccbbe0735aead429e6c0b223500e1001..86b70eb2541341ab32abe9b8af925ff01d1abf77 100755 (executable)
          </child>
 
          <child>
-           <widget class="GtkButton" id="settingsOKBtn">
+           <widget class="GtkButton" id="button12">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Apply</property>
+             <property name="use_underline">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="response_id">0</property>
+             <signal name="clicked" handler="on_settingsApplyBtn_clicked" last_modification_time="Mon, 20 Jul 2009 16:39:55 GMT"/>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="button11">
              <property name="visible">True</property>
              <property name="label" translatable="yes">OK</property>
              <property name="use_underline">True</property>
@@ -5278,24 +5290,24 @@ Custom</property>
                        </packing>
                      </child>
 
-                 <child>
-                   <widget class="GtkEntry" id="gvprargs">
-                     <property name="visible">True</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">*</property>
-                     <property name="activates_default">False</property>
-                   </widget>
-                   <packing>
+                     <child>
+                       <widget class="GtkEntry" id="gvprargs">
+                         <property name="visible">True</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">*</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>
+                       </packing>
+                     </child>
 
                      <child>
                        <widget class="GtkLabel" id="label114">