meld r1119 - in trunk: . glade2



Author: kaiw
Date: Wed Jan  7 22:29:31 2009
New Revision: 1119
URL: http://svn.gnome.org/viewvc/meld?rev=1119&view=rev

Log:
Remove linkmap drawing style preference

Modified:
   trunk/filediff.py
   trunk/glade2/meldapp.glade
   trunk/meldapp.py

Modified: trunk/filediff.py
==============================================================================
--- trunk/filediff.py	(original)
+++ trunk/filediff.py	Wed Jan  7 22:29:31 2009
@@ -300,10 +300,7 @@
         self.pixbuf_copy1  = load("button_copy1.xpm")
 
     def on_preference_changed(self, key, value):
-        if key == "draw_style":
-            for l in self.linkmap:
-                l.queue_draw()
-        elif key == "tab_size":
+        if key == "tab_size":
             tabs = pango.TabArray(10, 0)
             for i in range(10):
                 tabs.set_tab(i, pango.TAB_LEFT, i*value*self.pango_char_width)
@@ -1178,7 +1175,6 @@
         else: # self.keymask == 0:
             pix0 = self.pixbuf_apply0
             pix1 = self.pixbuf_apply1
-        draw_style = self.prefs.draw_style
 
         which = self.linkmap.index(area)
         pix_start = [None] * self.num_panes
@@ -1220,29 +1216,22 @@
                 f0 -= 1
             if t0 == t1:
                 t0 -= 1
-            
-            if draw_style == 2:
-                context.move_to(x_steps[0], f0 - 0.5)
-                context.curve_to(x_steps[1], f0 - 0.5,
-                                 x_steps[2], t0 - 0.5,
-                                 x_steps[3], t0 - 0.5)
-                context.line_to(x_steps[3], t1 + 0.5)
-                context.curve_to(x_steps[2], t1 + 0.5,
-                                 x_steps[1], f1 + 0.5,
-                                 x_steps[0], f1 + 0.5)
-                context.close_path()
 
-                context.set_source_rgb(*self.fill_colors[c[0]])
-                context.fill_preserve()
+            context.move_to(x_steps[0], f0 - 0.5)
+            context.curve_to(x_steps[1], f0 - 0.5,
+                             x_steps[2], t0 - 0.5,
+                             x_steps[3], t0 - 0.5)
+            context.line_to(x_steps[3], t1 + 0.5)
+            context.curve_to(x_steps[2], t1 + 0.5,
+                             x_steps[1], f1 + 0.5,
+                             x_steps[0], f1 + 0.5)
+            context.close_path()
 
-                context.set_source_rgb(*self.line_colors[c[0]])
-                context.stroke()
-            else:
-                w = wtotal
-                p = self.pixbuf_apply0.get_width()
-                window.draw_polygon(gctext, 0, (( -1, f0), (  p, f0), (  p,f1), ( -1,f1)) )
-                window.draw_polygon(gctext, 0, ((w+1, t0), (w-p, t0), (w-p,t1), (w+1,t1)) )
-                window.draw_line( gctext, p, (f0+f1)/2, w-p, (t0+t1)/2 )
+            context.set_source_rgb(*self.fill_colors[c[0]])
+            context.fill_preserve()
+
+            context.set_source_rgb(*self.line_colors[c[0]])
+            context.stroke()
 
             x = wtotal-self.pixbuf_apply0.get_width()
             if c[0] in ("insert", "replace"):

Modified: trunk/glade2/meldapp.glade
==============================================================================
--- trunk/glade2/meldapp.glade	(original)
+++ trunk/glade2/meldapp.glade	Wed Jan  7 22:29:31 2009
@@ -1190,120 +1190,6 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkVBox" id="vbox26">
-                        <property name="visible">True</property>
-                        <property name="spacing">6</property>
-                        <child>
-                          <widget class="GtkLabel" id="label37">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">&lt;b&gt;Drawing Style&lt;/b&gt;</property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHBox" id="hbox19">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkLabel" id="label38">
-                                <property name="visible">True</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="padding">12</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkVBox" id="vbox3">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label5">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="xpad">4</property>
-                                    <property name="ypad">4</property>
-                                    <property name="label" translatable="yes">Choose how the central bar of the diff viewer is drawn. You may wish to choose a simpler mode if you find scrolling is slow.</property>
-                                    <property name="wrap">True</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkRadioButton" id="draw_style0">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="label" translatable="yes">Simple: Lines only</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="response_id">0</property>
-                                    <property name="draw_indicator">True</property>
-                                    <signal name="toggled" handler="on_draw_style_toggled"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkRadioButton" id="draw_style1">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="label" translatable="yes">Solid: Filled Quadilaterals</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="response_id">0</property>
-                                    <property name="draw_indicator">True</property>
-                                    <property name="group">draw_style0</property>
-                                    <signal name="toggled" handler="on_draw_style_toggled"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkRadioButton" id="draw_style2">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="label" translatable="yes">Curved: Filled Curves</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="response_id">0</property>
-                                    <property name="draw_indicator">True</property>
-                                    <property name="group">draw_style0</property>
-                                    <signal name="toggled" handler="on_draw_style_toggled"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">3</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
                       <widget class="GtkVBox" id="vbox28">
                         <property name="visible">True</property>
                         <property name="spacing">6</property>

Modified: trunk/meldapp.py
==============================================================================
--- trunk/meldapp.py	(original)
+++ trunk/meldapp.py	Wed Jan  7 22:29:31 2009
@@ -243,9 +243,7 @@
         self.gnome_default_editor_label.set_text( "(%s)" % " ".join(self.prefs.get_gnome_editor_command([])) )
         self.custom_edit_command_entry.set_text( " ".join(self.prefs.get_custom_editor_command([])) )
         # display
-        self.map_widgets_into_lists( ["draw_style"] )
         self.map_widgets_into_lists( ["toolbar_style"] )
-        self.draw_style[self.prefs.draw_style].set_active(1)
         self.toolbar_style[self.prefs.toolbar_style].set_active(1)
         # file filters
         cols = [ (_("Name"), type("")), (_("Active"), type(0)), (_("Pattern"), type("")) ]
@@ -304,9 +302,6 @@
     #
     # display
     #
-    def on_draw_style_toggled(self, radio):
-        if radio.get_active():
-            self.prefs.draw_style = self.draw_style.index(radio)
     def on_toolbar_style_toggled(self, radio):
         if radio.get_active():
             self.prefs.toolbar_style = self.toolbar_style.index(radio)
@@ -437,7 +432,6 @@
         "edit_command_custom" : prefs.Value(prefs.STRING, "gedit"),
         "supply_newline": prefs.Value(prefs.BOOL,1),
         "text_codecs": prefs.Value(prefs.STRING, "utf8 latin1"),
-        "draw_style": prefs.Value(prefs.INT,2),
         "toolbar_style": prefs.Value(prefs.INT,0),
         "ignore_symlinks": prefs.Value(prefs.BOOL,0),
         "vc_console_visible": prefs.Value(prefs.BOOL, 0),



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