glom r1662 - in trunk: . glom/mode_data glom/mode_design/print_layouts glom/utility_widgets
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1662 - in trunk: . glom/mode_data glom/mode_design/print_layouts glom/utility_widgets
- Date: Wed, 20 Aug 2008 15:39:17 +0000 (UTC)
Author: murrayc
Date: Wed Aug 20 15:39:16 2008
New Revision: 1662
URL: http://svn.gnome.org/viewvc/glom?rev=1662&view=rev
Log:
2008-08-20 Murray Cumming <murrayc murrayc com>
* glom/utility_widgets/dragbar.cc:
* glom/utility_widgets/dragbutton.cc:
* glom/utility_widgets/dragbutton.h: Whitespace corrections.
Pass strings as const&. Added a TODO asking for explanation.
This needs to be renamed to something more layout-editing specific.
Maybe LayoutToolbar and LayoutToolbarButton.
Added:
trunk/glom/mode_design/print_layouts/print_layout_toolbar.cc
- copied unchanged from r1661, /trunk/glom/utility_widgets/dragbar.h
trunk/glom/mode_design/print_layouts/print_layout_toolbar.h
- copied unchanged from r1661, /trunk/glom/utility_widgets/dragbar.h
Modified:
trunk/ChangeLog
trunk/glom/mode_data/box_data_details.cc
trunk/glom/utility_widgets/dragbar.cc
trunk/glom/utility_widgets/dragbutton.cc
trunk/glom/utility_widgets/dragbutton.h
Modified: trunk/glom/mode_data/box_data_details.cc
==============================================================================
--- trunk/glom/mode_data/box_data_details.cc (original)
+++ trunk/glom/mode_data/box_data_details.cc Wed Aug 20 15:39:16 2008
@@ -81,6 +81,7 @@
m_HBox_Sidebar.pack_start (m_Dragbar, Gtk::PACK_SHRINK);
m_Dragbar.hide();
#endif
+
m_HBox_Sidebar.pack_start(m_ScrolledWindow);
m_ScrolledWindow.add(m_FlowTable);
// The FlowTable does not support native scrolling, so gtkmm adds it to a
@@ -209,16 +210,13 @@
m_FlowTable.add_layout_group(*iter);
}
}
+
#ifndef GLOM_ENABLE_CLIENT_ONLY
m_FlowTable.set_design_mode(m_design_mode);
- if (m_design_mode)
- {
+ if(m_design_mode)
m_Dragbar.show();
- }
else
- {
m_Dragbar.hide();
- }
#endif
}
Modified: trunk/glom/utility_widgets/dragbar.cc
==============================================================================
--- trunk/glom/utility_widgets/dragbar.cc (original)
+++ trunk/glom/utility_widgets/dragbar.cc Wed Aug 20 15:39:16 2008
@@ -1,6 +1,6 @@
/* Glom
*
- * Copyright (C) 2007 Johannes Schmid <johannes schmid openismus com>
+ * Copyright (C) 2007, 2008 Openismus GmbH
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
Modified: trunk/glom/utility_widgets/dragbutton.cc
==============================================================================
--- trunk/glom/utility_widgets/dragbutton.cc (original)
+++ trunk/glom/utility_widgets/dragbutton.cc Wed Aug 20 15:39:16 2008
@@ -1,6 +1,6 @@
/* Glom
*
- * Copyright (C) 2007 Johannes Schmid <johannes schmid openismus com>
+ * Copyright (C) 2007, 2008 Openismus GmbH
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -24,17 +24,19 @@
{
DragButton::DragButton(Gtk::Image& image, LayoutWidgetBase::enumType type,
- Glib::ustring title, Glib::ustring tooltip):
- Gtk::ToolButton(image)
+ const Glib::ustring& title, const Glib::ustring& tooltip)
+: Gtk::ToolButton(image)
{
m_type = type;
- g_object_set_data (G_OBJECT(gobj()), "glom-type", GINT_TO_POINTER(type));
+ g_object_set_data(G_OBJECT(gobj()), "glom-type", GINT_TO_POINTER(type));
+
std::list<Gtk::TargetEntry> targetentries;
targetentries.push_back(Gtk::TargetEntry(get_target()));
+
drag_source_set(targetentries, Gdk::MODIFIER_MASK,
Gdk::ACTION_COPY | Gdk::ACTION_MOVE);
- set_tooltip_text (tooltip);
- set_label (title);
+ set_tooltip_text(tooltip);
+ set_label(title);
}
DragButton::~DragButton()
@@ -50,7 +52,7 @@
void DragButton::on_drag_begin(const Glib::RefPtr<Gdk::DragContext>& drag_context)
{
- drag_context->set_icon (dynamic_cast<Gtk::Image*>(get_icon_widget())->get_pixbuf(), 0, 0);
+ drag_context->set_icon(dynamic_cast<Gtk::Image*>(get_icon_widget())->get_pixbuf(), 0, 0);
}
} // namespace Glom
Modified: trunk/glom/utility_widgets/dragbutton.h
==============================================================================
--- trunk/glom/utility_widgets/dragbutton.h (original)
+++ trunk/glom/utility_widgets/dragbutton.h Wed Aug 20 15:39:16 2008
@@ -1,6 +1,6 @@
/* Glom
*
- * Copyright (C) 2007 Johannes Schmid <johannes schmid openismus com>
+ * Copyright (C) 2007, 2008 Openismus GmbH
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -18,35 +18,39 @@
* Boston, MA 02111-1307, USA.
*/
+
+#ifndef GLOM_UTILITY_WIDGETS_DRAGBUTTON_H
+#define GLOM_UTILITY_WIDGETS_DRAGBUTTON_H
+
#include <gtkmm/button.h>
#include <gtkmm/image.h>
#include <string>
#include "layoutwidgetbase.h"
-#ifndef DRAGBUTTON_H
-#define DRAGBUTTON_H
-
namespace Glom
{
class DragButton : public Gtk::ToolButton
{
- public:
- DragButton(Gtk::Image& image, LayoutWidgetBase::enumType type,
- Glib::ustring title, Glib::ustring tooltip);
- ~DragButton();
+public:
+ DragButton(Gtk::Image& image, LayoutWidgetBase::enumType type, const Glib::ustring& title, const Glib::ustring& tooltip);
+ ~DragButton();
- static const gchar* get_target() {return "flowtable";};
- protected:
- virtual void on_drag_begin(const Glib::RefPtr<Gdk::DragContext>& drag_context);
- virtual void on_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,
- Gtk::SelectionData& selection_data, guint, guint);
+ //TODO: What is this for? murrayc.
+ static const gchar* get_target()
+ {
+ return "flowtable";
+ };
+
+protected:
+ virtual void on_drag_begin(const Glib::RefPtr<Gdk::DragContext>& drag_context);
+ virtual void on_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&, Gtk::SelectionData& selection_data, guint, guint);
private:
LayoutWidgetBase::enumType m_type;
};
}
-#endif // DRAGBUTTON_H
+#endif //GLOM_UTILITY_WIDGETS_DRAGBUTTON_H
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]