[glom/gtkmm4v3: 11/21] Remove use of GimpRuler, sadly.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/gtkmm4v3: 11/21] Remove use of GimpRuler, sadly.
- Date: Tue, 14 Mar 2017 09:44:29 +0000 (UTC)
commit d919e32a1ee3a48454e8fcc39d9ad06a05fe1972
Author: Murray Cumming <murrayc murrayc com>
Date: Sun Dec 18 12:48:22 2016 +0100
Remove use of GimpRuler, sadly.
The code needs to be updated to GTK+4, but Gimp is not yet fully
ported to GTK+3.
Replacement of API such as gdk_window_get_effective_parent() is
apparently much work for me to want to maintain it outside of Gimp:
https://git.gnome.org/browse/gtk+/commit/?id=70935f09526ba9f1d0b2f6af10e18712df73eda9
Makefile_glom.am | 15 -
.../print_layouts/window_print_layout_edit.cc | 24 +-
.../print_layouts/window_print_layout_edit.h | 6 +-
glom/utility_widgets/gimpruler/gimpruler.c | 1420 --------------------
glom/utility_widgets/gimpruler/gimpruler.h | 89 --
.../gimpruler/libgimpbase/gimpbase-private.c | 48 -
.../gimpruler/libgimpbase/gimpbase-private.h | 69 -
.../gimpruler/libgimpbase/gimpbase.h | 47 -
.../gimpruler/libgimpbase/gimpbaseenums.h | 545 --------
.../gimpruler/libgimpbase/gimpbasetypes.h | 113 --
.../gimpruler/libgimpbase/gimpparam.h | 67 -
.../gimpruler/libgimpbase/gimpunit.c | 686 ----------
.../gimpruler/libgimpbase/gimpunit.h | 112 --
.../gimpruler/libgimpmath/gimpmath.h | 136 --
14 files changed, 17 insertions(+), 3360 deletions(-)
---
diff --git a/Makefile_glom.am b/Makefile_glom.am
index e8dc8e6..cb8b657 100644
--- a/Makefile_glom.am
+++ b/Makefile_glom.am
@@ -19,10 +19,6 @@
# The location of the gettext catalogs as defined by intltool.
glom_localedir = @localedir@
-#Let gimpruler build without changing the paths in its source code:
-glom_includes += -I$(top_srcdir)/glom/utility_widgets/gimpruler
-
-
bin_PROGRAMS += glom/glom
@@ -236,17 +232,6 @@ glom_source_files = \
glom/utility_widgets/flowtable.cc \
glom/utility_widgets/flowtable.h \
$(glom_eggspreadtable_files) \
- glom/utility_widgets/gimpruler/gimpruler.c \
- glom/utility_widgets/gimpruler/gimpruler.h \
- glom/utility_widgets/gimpruler/libgimpbase/gimpbase.h \
- glom/utility_widgets/gimpruler/libgimpbase/gimpbaseenums.h \
- glom/utility_widgets/gimpruler/libgimpbase/gimpbasetypes.h \
- glom/utility_widgets/gimpruler/libgimpbase/gimpbase-private.h \
- glom/utility_widgets/gimpruler/libgimpbase/gimpbase-private.c \
- glom/utility_widgets/gimpruler/libgimpbase/gimpparam.h \
- glom/utility_widgets/gimpruler/libgimpbase/gimpunit.c \
- glom/utility_widgets/gimpruler/libgimpbase/gimpunit.h \
- glom/utility_widgets/gimpruler/libgimpmath/gimpmath.h \
glom/utility_widgets/imageglom.cc \
glom/utility_widgets/imageglom.h \
glom/utility_widgets/layoutwidgetbase.cc \
diff --git a/glom/mode_design/print_layouts/window_print_layout_edit.cc
b/glom/mode_design/print_layouts/window_print_layout_edit.cc
index 0481f9f..4f214d5 100644
--- a/glom/mode_design/print_layouts/window_print_layout_edit.cc
+++ b/glom/mode_design/print_layouts/window_print_layout_edit.cc
@@ -101,6 +101,7 @@ Window_PrintLayout_Edit::Window_PrintLayout_Edit(BaseObjectType* cobject, const
//The rulers are not in the glade file because they use an unusual widget
//that Glade wouldn't usually know about:
+ /*
m_vruler = GIMP_RULER(gimp_ruler_new(GTK_ORIENTATION_VERTICAL));
gtk_widget_show(GTK_WIDGET(m_vruler));
Glib::wrap(GTK_WIDGET(m_vruler))->drag_source_set(m_drag_targets_rule);
@@ -133,6 +134,7 @@ Window_PrintLayout_Edit::Window_PrintLayout_Edit(BaseObjectType* cobject, const
gimp_ruler_set_unit(m_hruler, GIMP_UNIT_MM);
gimp_ruler_set_unit(m_vruler, GIMP_UNIT_MM);
+ */
builder->get_widget("toolpalette_box", m_palette_box);
@@ -322,8 +324,8 @@ bool Window_PrintLayout_Edit::on_canvas_drag_motion(const Glib::RefPtr<Gdk::Drag
canvas_convert_from_drag_pixels(item_x, item_y, true /* adjust for scrolling */);
//Show the position in the rulers:
- gimp_ruler_set_position(m_hruler, item_x);
- gimp_ruler_set_position(m_vruler, item_y);
+ //gimp_ruler_set_position(m_hruler, item_x);
+ //gimp_ruler_set_position(m_vruler, item_y);
//Handle dragging of the rule from the GimpRuler widget:
if(target == DRAG_TARGET_NAME_RULE)
@@ -720,8 +722,8 @@ bool Window_PrintLayout_Edit::on_canvas_motion_notify_event(GdkEventMotion* moti
double y = motion_event->y;
canvas_convert_from_drag_pixels(x, y, false /* do not adjust for scrolling */);
- gimp_ruler_set_position(m_hruler, x);
- gimp_ruler_set_position(m_vruler, y);
+ //gimp_ruler_set_position(m_hruler, x);
+ //gimp_ruler_set_position(m_vruler, y);
return false;
}
@@ -934,6 +936,7 @@ void Window_PrintLayout_Edit::do_menu_view_show_rules(bool active)
m_canvas.set_rules_visibility(active);
+ /*
auto hruler = Glib::wrap(GTK_WIDGET(m_hruler));
auto vruler = Glib::wrap(GTK_WIDGET(m_vruler));
@@ -947,6 +950,7 @@ void Window_PrintLayout_Edit::do_menu_view_show_rules(bool active)
hruler->drag_source_unset();
vruler->drag_source_unset();
}
+ */
}
@@ -1305,8 +1309,8 @@ void Window_PrintLayout_Edit::set_ruler_sizes()
double y2 = 0;
m_canvas.get_bounds(x1, y1, x2, y2);
- gimp_ruler_set_range(m_hruler, x1, x2, x2);
- gimp_ruler_set_range(m_vruler, y1, y2, x2);
+ //gimp_ruler_set_range(m_hruler, x1, x2, x2);
+ //gimp_ruler_set_range(m_vruler, y1, y2, x2);
//Set the limits for the SpinButtons too:
spinbutton_set_max(*m_spinbutton_x, x2);
@@ -1329,8 +1333,8 @@ void Window_PrintLayout_Edit::on_scroll_value_changed()
//std::cout << "DEBUG: Calling m_hruler->set_range(" << x << ", " << x + width << ", 0, " << x + width <<
std::endl;
- gimp_ruler_set_range(m_hruler, x, x + width, x + width);
- gimp_ruler_set_range(m_vruler, y, y + height, y + height);
+ //gimp_ruler_set_range(m_hruler, x, x + width, x + width);
+ //gimp_ruler_set_range(m_vruler, y, y + height, y + height);
}
bool Window_PrintLayout_Edit::on_configure_event(GdkEventConfigure* configure_event)
@@ -1483,8 +1487,8 @@ void Window_PrintLayout_Edit::on_selected_item_moved(const Glib::RefPtr<CanvasIt
double width = 0;
double height = 0;
get_dimensions_of_multiple_selected_items(x, y, width, height);
- gimp_ruler_set_position(m_hruler, x);
- gimp_ruler_set_position(m_vruler, y);
+ //gimp_ruler_set_position(m_hruler, x);
+ //gimp_ruler_set_position(m_vruler, y);
}
void Window_PrintLayout_Edit::on_spinbutton_x()
diff --git a/glom/mode_design/print_layouts/window_print_layout_edit.h
b/glom/mode_design/print_layouts/window_print_layout_edit.h
index fe1487a..f0de0b7 100644
--- a/glom/mode_design/print_layouts/window_print_layout_edit.h
+++ b/glom/mode_design/print_layouts/window_print_layout_edit.h
@@ -30,7 +30,7 @@
#include <gtkmm/applicationwindow.h>
#include <gtkmm/entry.h>
#include <gtkmm/label.h>
-#include <glom/utility_widgets/gimpruler/gimpruler.h>
+//#include <glom/utility_widgets/gimpruler/gimpruler.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/spinbutton.h>
#include <gtkmm/button.h>
@@ -181,8 +181,8 @@ private:
type_list_items m_layout_items_to_paste;
std::vector<Gtk::TargetEntry> m_drag_targets_rule;
- GimpRuler* m_vruler;
- GimpRuler* m_hruler;
+ //GimpRuler* m_vruler;
+ //GimpRuler* m_hruler;
//Main menu:
Glib::RefPtr<Gtk::Builder> m_builder;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]