From d3460d8a60c4d2c99c2c12fe0646db224335e232 Mon Sep 17 00:00:00 2001
From: Kamalpreet Grewal <>
Date: Thu, 7 Apr 2016 12:54:08 +0200
Subject: Add clickable link to www.inkscape.org to splash screen dialog.
(bzr r14764)
---
src/ui/dialog/aboutbox.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
(limited to 'src/ui')
diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp
index 81f48e6ef..b653a630d 100644
--- a/src/ui/dialog/aboutbox.cpp
+++ b/src/ui/dialog/aboutbox.cpp
@@ -120,10 +120,22 @@ AboutBox::AboutBox() : Gtk::Dialog(_("About Inkscape")) {
label->set_selectable(true);
label->show();
+ Gtk::Label *link = new Gtk::Label();
+ const gchar *website_link =
+ " https://www.inkscape.org";
+
+ link->set_markup(website_link);
+ link->set_alignment(Gtk::ALIGN_END);
+ link->set_padding(5,5);
+ link->set_selectable(true);
+ link->show();
+
#if WITH_GTKMM_3_0
get_content_area()->pack_start(*manage(label), false, false);
+ get_content_area()->pack_start(*manage(link), false, false);
#else
get_vbox()->pack_start(*manage(label), false, false);
+ get_vbox()->pack_start(*manage(link), false, false);
#endif
Gtk::Requisition requisition;
--
cgit v1.2.3
From d0aef5c0c23b426582534f6a13a90833ac719373 Mon Sep 17 00:00:00 2001
From: Marc Jeanmougin
Date: Fri, 8 Apr 2016 19:38:40 +0200
Subject: Remove inkscape-specific glib clone function (and get rid of
deprecated Glib ScopedPtr use)
Fixed bugs:
- https://launchpad.net/bugs/1567485
(bzr r14766)
---
src/ui/clipboard.cpp | 39 +--------------------------------------
1 file changed, 1 insertion(+), 38 deletions(-)
(limited to 'src/ui')
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index f0dc33740..4099bd631 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -146,8 +146,6 @@ private:
void _setClipboardColor(guint32);
void _userWarn(SPDesktop *, char const *);
- void _inkscape_wait_for_targets(std::list &);
-
// private properites
SPDocument *_clipboardSPDoc; ///< Document that stores the clipboard until someone requests it
Inkscape::XML::Node *_defs; ///< Reference to the clipboard document's defs node
@@ -1302,9 +1300,7 @@ Geom::Scale ClipboardManagerImpl::_getScale(SPDesktop *desktop, Geom::Point cons
*/
Glib::ustring ClipboardManagerImpl::_getBestTarget()
{
- // GTKmm's wait_for_targets() is broken, see the comment in _inkscape_wait_for_targets()
- std::list targets; // = _clipboard->wait_for_targets();
- _inkscape_wait_for_targets(targets);
+ std::list targets = _clipboard->wait_for_targets();
// clipboard target debugging snippet
/*
@@ -1456,39 +1452,6 @@ void ClipboardManagerImpl::_userWarn(SPDesktop *desktop, char const *msg)
desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, msg);
}
-
-// GTKMM's clipboard::wait_for_targets is buggy and might return bogus, see
-//
-// https://bugs.launchpad.net/inkscape/+bug/296778
-// http://mail.gnome.org/archives/gtk-devel-list/2009-June/msg00062.html
-//
-// for details. Until this has been fixed upstream we will use our own implementation
-// of this method, as copied from /gtkmm-2.16.0/gtk/gtkmm/clipboard.cc.
-void ClipboardManagerImpl::_inkscape_wait_for_targets(std::list &listTargets)
-{
- //Get a newly-allocated array of atoms:
- GdkAtom* targets = NULL;
- gint n_targets = 0;
- gboolean test = gtk_clipboard_wait_for_targets( gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), &targets, &n_targets );
- if (!test || (targets == NULL)) {
- return;
- }
-
- //Add the targets to the C++ container:
- for (int i = 0; i < n_targets; i++)
- {
- //Convert the atom to a string:
- gchar* const atom_name = gdk_atom_name(targets[i]);
-
- Glib::ustring target;
- if (atom_name) {
- target = Glib::ScopedPtr(atom_name).get(); //This frees the gchar*.
- }
-
- listTargets.push_back(target);
- }
-}
-
/* #######################################
ClipboardManager class
####################################### */
--
cgit v1.2.3
From e95a3400c24ac43bcb93d184a1089a723a856351 Mon Sep 17 00:00:00 2001
From: Tavmjong Bah
Date: Fri, 8 Apr 2016 20:41:33 +0200
Subject: Provide tooltip for Selection set dialog tree area. Based on patch
from Kamalpreet Grewal.
(bzr r14767)
---
src/ui/dialog/tags.cpp | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
(limited to 'src/ui')
diff --git a/src/ui/dialog/tags.cpp b/src/ui/dialog/tags.cpp
index cbb2fb953..c99c1bff3 100644
--- a/src/ui/dialog/tags.cpp
+++ b/src/ui/dialog/tags.cpp
@@ -935,7 +935,17 @@ TagsPanel::TagsPanel() :
_tree.set_headers_visible(false);
_tree.set_reorderable(true);
_tree.enable_model_drag_dest (Gdk::ACTION_MOVE);
-
+
+ // This string is constructed to use already translated strings.
+ // The tooltip applies to the whole tree area. It would be better
+ // if the tooltip was split into parts and only applied to the
+ // icons but doing that is quite complicated.
+ Glib::ustring tooltip_string = "'+': ";
+ tooltip_string += (_("Add selection to set"));
+ tooltip_string += "; '×': ";
+ tooltip_string += (_("Remove from selection set"));
+ _tree.set_tooltip_text( tooltip_string );
+
Inkscape::UI::Widget::AddToIcon * addRenderer = manage( new Inkscape::UI::Widget::AddToIcon());
int addColNum = _tree.append_column("type", *addRenderer) - 1;
Gtk::TreeViewColumn *col = _tree.get_column(addColNum);
--
cgit v1.2.3
From 364d0165d1251b22b20e190f7e7c58c5fe72fe88 Mon Sep 17 00:00:00 2001
From: su_v
Date: Sat, 9 Apr 2016 04:22:41 +0200
Subject: GTK3 fix
Fixed bugs:
- https://launchpad.net/bugs/1567485
(bzr r14768)
---
src/ui/clipboard.cpp | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'src/ui')
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index 4099bd631..d581dbf7e 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -1300,7 +1300,11 @@ Geom::Scale ClipboardManagerImpl::_getScale(SPDesktop *desktop, Geom::Point cons
*/
Glib::ustring ClipboardManagerImpl::_getBestTarget()
{
+#if WITH_GTKMM_3_0
+ std::vector targets = _clipboard->wait_for_targets();
+#else
std::list targets = _clipboard->wait_for_targets();
+#endif
// clipboard target debugging snippet
/*
--
cgit v1.2.3
From 4ac5489c40bccb04912f12f3ea8b6c870d8fe818 Mon Sep 17 00:00:00 2001
From: Krzysztof Kosi??ski
Date: Mon, 11 Apr 2016 15:48:00 +0100
Subject: Hackfest 2016: fix critical warning on startup
(bzr r14780)
---
src/ui/widget/selected-style.cpp | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
(limited to 'src/ui')
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index 9e283fc64..87cf0b8c4 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -363,19 +363,6 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
_popup_sw.show_all();
}
- _fill_place.signal_button_release_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_fill_click));
- _stroke_place.signal_button_release_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_stroke_click));
- _opacity_place.signal_button_press_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_opacity_click));
- _stroke_width_place.signal_button_press_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_sw_click));
- _stroke_width_place.signal_button_release_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_sw_click));
-
-
- _opacity_sb.signal_populate_popup().connect(sigc::mem_fun(*this, &SelectedStyle::on_opacity_menu));
- _opacity_sb.signal_value_changed().connect(sigc::mem_fun(*this, &SelectedStyle::on_opacity_changed));
- // Connect to key-press to ensure focus is consistent with other spin buttons when using the keys vs mouse-click
- g_signal_connect (G_OBJECT (_opacity_sb.gobj()), "key-press-event", G_CALLBACK (spinbutton_keypress), _opacity_sb.gobj());
- g_signal_connect (G_OBJECT (_opacity_sb.gobj()), "focus-in-event", G_CALLBACK (spinbutton_focus_in), _opacity_sb.gobj());
-
_fill_place.add(_na[SS_FILL]);
_fill_place.set_tooltip_text(__na[SS_FILL]);
@@ -452,6 +439,17 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
"drag_data_received",
G_CALLBACK(dragDataReceived),
_drop[SS_FILL]);
+
+ _fill_place.signal_button_release_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_fill_click));
+ _stroke_place.signal_button_release_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_stroke_click));
+ _opacity_place.signal_button_press_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_opacity_click));
+ _stroke_width_place.signal_button_press_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_sw_click));
+ _stroke_width_place.signal_button_release_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_sw_click));
+ _opacity_sb.signal_populate_popup().connect(sigc::mem_fun(*this, &SelectedStyle::on_opacity_menu));
+ _opacity_sb.signal_value_changed().connect(sigc::mem_fun(*this, &SelectedStyle::on_opacity_changed));
+ // Connect to key-press to ensure focus is consistent with other spin buttons when using the keys vs mouse-click
+ g_signal_connect (G_OBJECT (_opacity_sb.gobj()), "key-press-event", G_CALLBACK (spinbutton_keypress), _opacity_sb.gobj());
+ g_signal_connect (G_OBJECT (_opacity_sb.gobj()), "focus-in-event", G_CALLBACK (spinbutton_focus_in), _opacity_sb.gobj());
}
SelectedStyle::~SelectedStyle()
--
cgit v1.2.3
From 4f88ccdfed31eb06cfc0d362dc2cb8358bb65e34 Mon Sep 17 00:00:00 2001
From: Martin Owens
Date: Tue, 12 Apr 2016 10:47:23 +0100
Subject: Bump ifdefs to 3.8 (now ifdefs say 3.0 instead of 3.2 or 3.8)
(bzr r14788)
---
src/ui/dialog/ocaldialogs.cpp | 4 ++--
src/ui/dialog/ocaldialogs.h | 6 +++---
src/ui/widget/gimpcolorwheel.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
(limited to 'src/ui')
diff --git a/src/ui/dialog/ocaldialogs.cpp b/src/ui/dialog/ocaldialogs.cpp
index a1c7d41bd..f2ee79d06 100644
--- a/src/ui/dialog/ocaldialogs.cpp
+++ b/src/ui/dialog/ocaldialogs.cpp
@@ -573,7 +573,7 @@ void StatusWidget::end_process()
clear();
}
-#if !GTK_CHECK_VERSION(3,6,0)
+#if !GTK_CHECK_VERSION(3,0,0)
SearchEntry::SearchEntry() : Gtk::Entry()
{
signal_changed().connect(sigc::mem_fun(*this, &SearchEntry::_on_changed));
@@ -1222,7 +1222,7 @@ ImportDialog::ImportDialog(Gtk::Window& parent_window, FileDialogType file_types
label_not_found = new Gtk::Label();
label_description = new Gtk::Label();
-#if GTK_CHECK_VERSION(3,6,0)
+#if GTK_CHECK_VERSION(3,0,0)
entry_search = new Gtk::SearchEntry();
#else
entry_search = new SearchEntry();
diff --git a/src/ui/dialog/ocaldialogs.h b/src/ui/dialog/ocaldialogs.h
index 6ceceb9ef..9de24d821 100644
--- a/src/ui/dialog/ocaldialogs.h
+++ b/src/ui/dialog/ocaldialogs.h
@@ -26,7 +26,7 @@
#include
-#if GTK_CHECK_VERSION(3,6,0)
+#if GTK_CHECK_VERSION(3,0,0)
# include
#endif
@@ -336,7 +336,7 @@ public:
Gtk::Label* label;
};
-#if !GTK_CHECK_VERSION(3,6,0)
+#if !GTK_CHECK_VERSION(3,0,0)
/**
* A Gtk::Entry with search & clear icons
*/
@@ -460,7 +460,7 @@ private:
Glib::ustring filename_image;
Glib::ustring filename_thumbnail;
-#if GTK_CHECK_VERSION(3,6,0)
+#if GTK_CHECK_VERSION(3,0,0)
Gtk::SearchEntry *entry_search;
#else
SearchEntry *entry_search;
diff --git a/src/ui/widget/gimpcolorwheel.c b/src/ui/widget/gimpcolorwheel.c
index c857cfa8a..3642848df 100644
--- a/src/ui/widget/gimpcolorwheel.c
+++ b/src/ui/widget/gimpcolorwheel.c
@@ -1246,7 +1246,7 @@ paint_triangle (GimpColorWheel *wheel,
#endif
}
-#if GTK_CHECK_VERSION(3,2,0)
+#if GTK_CHECK_VERSION(3,0,0)
static gboolean
gimp_color_wheel_draw (GtkWidget *widget,
cairo_t *cr)
--
cgit v1.2.3
From 3ee1ba1e9a8019e98012bc77ff3953363b2fa17a Mon Sep 17 00:00:00 2001
From: Tavmjong Bah
Date: Tue, 12 Apr 2016 12:28:18 +0200
Subject: Add option for larger icons (useful for 4K display).
(bzr r14789)
---
src/ui/dialog/inkscape-preferences.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
(limited to 'src/ui')
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index b20f71a6a..c7a168dee 100644
--- a/src/ui/dialog/inkscape-preferences.cpp
+++ b/src/ui/dialog/inkscape-preferences.cpp
@@ -613,8 +613,9 @@ void InkscapePreferences::initPageUI()
_("Set the language for menus and number formats"), false);
{
- Glib::ustring sizeLabels[] = {C_("Icon size", "Large"), C_("Icon size", "Small"), C_("Icon size", "Smaller")};
- int sizeValues[] = {0, 1, 2};
+ Glib::ustring sizeLabels[] = {C_("Icon size", "Larger"), C_("Icon size", "Large"), C_("Icon size", "Small"), C_("Icon size", "Smaller")};
+ int sizeValues[] = {3, 0, 1, 2};
+ // "Larger" is 3 to not break existing preference files. Should fix in GTK3
_misc_small_tools.init( "/toolbox/tools/small", sizeLabels, sizeValues, G_N_ELEMENTS(sizeLabels), 0 );
_page_ui.add_line( false, _("Toolbox icon size:"), _misc_small_tools, "",
--
cgit v1.2.3
From a907096a990015010ec1171cd8997d33951f28a2 Mon Sep 17 00:00:00 2001
From: Krzysztof Kosi??ski
Date: Tue, 12 Apr 2016 11:35:15 +0100
Subject: Hackfest 2016: un-obfuscate the SPCanvas widget.
(bzr r14790)
---
src/ui/interface.cpp | 4 ++--
src/ui/tool/event-utils.cpp | 8 ++++----
src/ui/tools/connector-tool.cpp | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
(limited to 'src/ui')
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp
index 531aa728d..8639861f8 100644
--- a/src/ui/interface.cpp
+++ b/src/ui/interface.cpp
@@ -1018,7 +1018,7 @@ sp_ui_drag_data_received(GtkWidget *widget,
{
int destX = 0;
int destY = 0;
- gtk_widget_translate_coordinates( widget, &(desktop->canvas->widget), x, y, &destX, &destY );
+ gtk_widget_translate_coordinates( widget, GTK_WIDGET(desktop->canvas), x, y, &destX, &destY );
Geom::Point where( sp_canvas_window_to_world( desktop->canvas, Geom::Point( destX, destY ) ) );
Geom::Point const button_dt(desktop->w2d(where));
Geom::Point const button_doc(desktop->dt2doc(button_dt));
@@ -1141,7 +1141,7 @@ sp_ui_drag_data_received(GtkWidget *widget,
if ( worked ) {
int destX = 0;
int destY = 0;
- gtk_widget_translate_coordinates( widget, &(desktop->canvas->widget), x, y, &destX, &destY );
+ gtk_widget_translate_coordinates( widget, GTK_WIDGET(desktop->canvas), x, y, &destX, &destY );
Geom::Point where( sp_canvas_window_to_world( desktop->canvas, Geom::Point( destX, destY ) ) );
Geom::Point const button_dt(desktop->w2d(where));
Geom::Point const button_doc(desktop->dt2doc(button_dt));
diff --git a/src/ui/tool/event-utils.cpp b/src/ui/tool/event-utils.cpp
index 079275d63..6b8d5f0dc 100644
--- a/src/ui/tool/event-utils.cpp
+++ b/src/ui/tool/event-utils.cpp
@@ -60,8 +60,8 @@ unsigned combine_motion_events(SPCanvas *canvas, GdkEventMotion &event, gint mas
}
GdkEvent *event_next;
gint i = 0;
- event.x -= canvas->x0;
- event.y -= canvas->y0;
+ event.x -= canvas->_x0;
+ event.y -= canvas->_y0;
event_next = gdk_event_get();
// while the next event is also a motion notify
@@ -92,8 +92,8 @@ unsigned combine_motion_events(SPCanvas *canvas, GdkEventMotion &event, gint mas
if (event_next) {
gdk_event_put(event_next);
}
- event.x += canvas->x0;
- event.y += canvas->y0;
+ event.x += canvas->_x0;
+ event.y += canvas->_y0;
return i;
}
diff --git a/src/ui/tools/connector-tool.cpp b/src/ui/tools/connector-tool.cpp
index b84d16686..74f2664fe 100644
--- a/src/ui/tools/connector-tool.cpp
+++ b/src/ui/tools/connector-tool.cpp
@@ -247,7 +247,7 @@ void ConnectorTool::setup() {
// Make sure we see all enter events for canvas items,
// even if a mouse button is depressed.
- this->desktop->canvas->gen_all_enter_events = true;
+ this->desktop->canvas->_gen_all_enter_events = true;
}
void ConnectorTool::set(const Inkscape::Preferences::Entry& val) {
@@ -276,7 +276,7 @@ void ConnectorTool::finish() {
this->cc_clear_active_conn();
// Restore the default event generating behaviour.
- this->desktop->canvas->gen_all_enter_events = false;
+ this->desktop->canvas->_gen_all_enter_events = false;
}
//-----------------------------------------------------------------------------
--
cgit v1.2.3