From 08e00fffc265ca1826c271c43d6ca7248fc7b123 Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Wed, 3 Nov 2010 21:10:20 +0300 Subject: [PATCH] whiteboard plugin. remove the lebels with the buttons and add tooltips --- plugins/whiteboard/plugin.py | 12 ++ plugins/whiteboard/whiteboard_widget.ui | 195 ++++-------------------- 2 files changed, 43 insertions(+), 164 deletions(-) diff --git a/plugins/whiteboard/plugin.py b/plugins/whiteboard/plugin.py index 60aa896d2..d81624908 100644 --- a/plugins/whiteboard/plugin.py +++ b/plugins/whiteboard/plugin.py @@ -275,6 +275,18 @@ class Base(object): iconset = gtk.IconSet(pixbuf=pixbuf) factory = gtk.IconFactory() factory.add('whiteboard', iconset) + img_path = self.plugin.local_file_path('brush_tool.png') + pixbuf = gtk.gdk.pixbuf_new_from_file(img_path) + iconset = gtk.IconSet(pixbuf=pixbuf) + factory.add('brush_tool', iconset) + img_path = self.plugin.local_file_path('line_tool.png') + pixbuf = gtk.gdk.pixbuf_new_from_file(img_path) + iconset = gtk.IconSet(pixbuf=pixbuf) + factory.add('line_tool', iconset) + img_path = self.plugin.local_file_path('oval_tool.png') + pixbuf = gtk.gdk.pixbuf_new_from_file(img_path) + iconset = gtk.IconSet(pixbuf=pixbuf) + factory.add('oval_tool', iconset) factory.add_default() img.set_from_stock('whiteboard', gtk.ICON_SIZE_BUTTON) self.button.set_image(img) diff --git a/plugins/whiteboard/whiteboard_widget.ui b/plugins/whiteboard/whiteboard_widget.ui index 22e13852d..403e2dfbc 100644 --- a/plugins/whiteboard/whiteboard_widget.ui +++ b/plugins/whiteboard/whiteboard_widget.ui @@ -9,42 +9,22 @@ - + True 6 vertical 6 - start True True True + Brush Tool: Draw freehand lines - + True - 6 - - - True - 1 - brush_tool.png - - - 0 - - - - - True - 0 - Brush Tool - - - 1 - - + brush_tool @@ -59,31 +39,12 @@ True True True + Oval Tool: Create circles and ellipses - + True - 6 - - - True - 1 - oval_tool.png - - - 0 - - - - - True - 0 - Oval Tool - - - 1 - - + oval_tool @@ -98,31 +59,12 @@ True True True + Line Tool: Draw straight lines - + True - 6 - - - True - 1 - line_tool.png - - - 0 - - - - - True - 0 - Line Tool - - - 1 - - + line_tool @@ -137,31 +79,12 @@ True True True + Delete Tool: Removal of the individual figures - + True - 6 - - - True - 1 - gtk-delete - - - 0 - - - - - True - 0 - Delete Tool - - - 1 - - + gtk-delete @@ -176,31 +99,12 @@ True True True + Clear Canvas: Cleanup Canvas - + True - 6 - - - True - 1 - gtk-clear - - - 0 - - - - - True - 0 - Clear Canvas - - - 1 - - + gtk-clear @@ -215,31 +119,12 @@ True True True + Export Images: Save image to file - + True - 6 - - - True - 1 - gtk-save-as - - - 0 - - - - - True - 0 - Export Image - - - 1 - - + gtk-save-as @@ -250,55 +135,37 @@ - + + 68 True True + Linewidth + vertical adjustment1 + True 0 + bottom False False 6 - True - + True - - - True - 1 - 1 - Foreground -Color: - - - 0 - - - - - True - True - True - #000000000000 - - - - False - False - 1 - - + True + True + Foreground Color + #000000000000 + False False 7 - True