glom r1660 - in trunk: . glom/utility_widgets



Author: jhs
Date: Wed Aug 20 09:20:46 2008
New Revision: 1660
URL: http://svn.gnome.org/viewvc/glom?rev=1660&view=rev

Log:
2008-08-20  Johannes Schmid  <jhs idefix>

	* glom/utility_widgets/dragbar.cc:
	* glom/utility_widgets/dragbutton.cc:
	* glom/utility_widgets/dragbutton.h:
	Added tooltips to toolitems

Modified:
   trunk/ChangeLog
   trunk/glom/utility_widgets/dragbar.cc
   trunk/glom/utility_widgets/dragbutton.cc
   trunk/glom/utility_widgets/dragbutton.h

Modified: trunk/glom/utility_widgets/dragbar.cc
==============================================================================
--- trunk/glom/utility_widgets/dragbar.cc	(original)
+++ trunk/glom/utility_widgets/dragbar.cc	Wed Aug 20 09:20:46 2008
@@ -50,13 +50,19 @@
     Gtk::manage (new Gtk::Image(GLOM_ICON_DIR "/glom-notebook.png"));
   
 	
-  DragButton* drag_group = Gtk::manage(new DragButton(*image_group, LayoutWidgetBase::TYPE_GROUP));  
-  DragButton* drag_notebook = Gtk::manage(new DragButton(*image_notebook, LayoutWidgetBase::TYPE_NOTEBOOK));  
+  DragButton* drag_group = Gtk::manage(new DragButton(*image_group, LayoutWidgetBase::TYPE_GROUP,
+                                       _("Drag to document to add a new group")));
+  DragButton* drag_notebook = Gtk::manage(new DragButton(*image_notebook, LayoutWidgetBase::TYPE_NOTEBOOK,
+                                          _("Drag to document to add a new notebook")));  
 
-  DragButton* drag_item = Gtk::manage(new DragButton(*image_item, LayoutWidgetBase::TYPE_FIELD));
-  DragButton* drag_button = Gtk::manage(new DragButton(*image_button, LayoutWidgetBase::TYPE_BUTTON));
-  DragButton* drag_text = Gtk::manage(new DragButton(*image_text, LayoutWidgetBase::TYPE_TEXT));  
-  DragButton* drag_image = Gtk::manage(new DragButton(*image_image, LayoutWidgetBase::TYPE_IMAGE));
+  DragButton* drag_item = Gtk::manage(new DragButton(*image_item, LayoutWidgetBase::TYPE_FIELD,
+                                      _("Drag to document to add a new database field")));
+  DragButton* drag_button = Gtk::manage(new DragButton(*image_button, LayoutWidgetBase::TYPE_BUTTON,
+                                        _("Drag to document to cadd a new button")));
+  DragButton* drag_text = Gtk::manage(new DragButton(*image_text, LayoutWidgetBase::TYPE_TEXT,
+                                      _("Drag to document to add a new text box")));  
+  DragButton* drag_image = Gtk::manage(new DragButton(*image_image, LayoutWidgetBase::TYPE_IMAGE,
+                                       _("Drag to document to add a new image")));
   
   //Note for translators: These are container layout items, containing child layout items, like container widgets in GTK+.
   GtkContainer* container_group = GTK_CONTAINER(egg_tool_item_group_new(_("Containers")));

Modified: trunk/glom/utility_widgets/dragbutton.cc
==============================================================================
--- trunk/glom/utility_widgets/dragbutton.cc	(original)
+++ trunk/glom/utility_widgets/dragbutton.cc	Wed Aug 20 09:20:46 2008
@@ -23,7 +23,8 @@
 namespace Glom
 {
   
-DragButton::DragButton(Gtk::Image& image, LayoutWidgetBase::enumType type) :
+DragButton::DragButton(Gtk::Image& image, LayoutWidgetBase::enumType type,
+                       Glib::ustring tooltip):
 	Gtk::ToolButton(image)
 {
   m_type = type;
@@ -32,6 +33,7 @@
   targetentries.push_back(Gtk::TargetEntry(get_target()));
   drag_source_set(targetentries, Gdk::MODIFIER_MASK, 
                   Gdk::ACTION_COPY | Gdk::ACTION_MOVE);
+  set_tooltip_text (tooltip);
 }
 
 DragButton::~DragButton()

Modified: trunk/glom/utility_widgets/dragbutton.h
==============================================================================
--- trunk/glom/utility_widgets/dragbutton.h	(original)
+++ trunk/glom/utility_widgets/dragbutton.h	Wed Aug 20 09:20:46 2008
@@ -33,7 +33,8 @@
 class DragButton : public Gtk::ToolButton
 {
   public:
-    DragButton(Gtk::Image& image, LayoutWidgetBase::enumType type);  
+    DragButton(Gtk::Image& image, LayoutWidgetBase::enumType type,
+							 Glib::ustring tooltip);  
     ~DragButton();
 
   



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