summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-02-06 08:19:53 +0000
committerJabiertxo Arraiza Cenoz <jtx@jtx.marker.es>2013-02-06 08:19:53 +0000
commit549a79b5367ffd259a23fbd18e93199d1c0149b7 (patch)
tree9c4ce4a0217afa63b59f32d02a60b848f43a9520 /src/ui/dialog
parentMerge from branch (diff)
parentSupress Pango error message. (diff)
downloadinkscape-549a79b5367ffd259a23fbd18e93199d1c0149b7.tar.gz
inkscape-549a79b5367ffd259a23fbd18e93199d1c0149b7.zip
Merge from branch
(bzr r11950.1.19)
Diffstat (limited to 'src/ui/dialog')
-rw-r--r--src/ui/dialog/export.cpp5
-rw-r--r--src/ui/dialog/filedialogimpl-win32.cpp22
-rw-r--r--src/ui/dialog/filedialogimpl-win32.h4
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp29
-rw-r--r--src/ui/dialog/font-substitution.cpp2
-rw-r--r--src/ui/dialog/input.cpp2
-rw-r--r--src/ui/dialog/object-properties.cpp30
-rw-r--r--src/ui/dialog/object-properties.h1
-rw-r--r--src/ui/dialog/symbols.cpp3
9 files changed, 63 insertions, 35 deletions
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index f267c5ae9..ecdfd3346 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -63,7 +63,12 @@
#include "helper/png-write.h"
+#if WITH_EXT_GDL
+#include <gdl/gdl-dock-item.h>
+#else
#include "libgdl/gdl-dock-item.h"
+#endif
+
// required to set status message after export
#include "desktop.h"
diff --git a/src/ui/dialog/filedialogimpl-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp
index 6425d9fee..496836c4d 100644
--- a/src/ui/dialog/filedialogimpl-win32.cpp
+++ b/src/ui/dialog/filedialogimpl-win32.cpp
@@ -26,6 +26,9 @@
#include <gdk/gdkwin32.h>
#include <glib/gstdio.h>
#include <glibmm/i18n.h>
+#if GLIB_CHECK_VERSION(2,32,0)
+#include <glibmm/thread.h>
+#endif
#include <gtkmm/window.h>
//Inkscape includes
@@ -133,7 +136,11 @@ FileDialogBaseWin32::FileDialogBaseWin32(Gtk::Window &parent,
Glib::RefPtr<const Gdk::Window> parentWindow = parent.get_window();
g_assert(parentWindow->gobj() != NULL);
+#if WITH_GTKMM_3_0
+ _ownerHwnd = (HWND)gdk_win32_window_get_handle((GdkWindow*)parentWindow->gobj());
+#else
_ownerHwnd = (HWND)gdk_win32_drawable_get_handle((GdkDrawable*)parentWindow->gobj());
+#endif
}
FileDialogBaseWin32::~FileDialogBaseWin32()
@@ -1576,16 +1583,23 @@ FileOpenDialogImplWin32::show()
// We can only run one worker thread at a time
if(_mutex != NULL) return false;
+#if !GLIB_CHECK_VERSION(2,32,0)
if(!Glib::thread_supported())
Glib::thread_init();
+#endif
_result = false;
_finished = false;
_file_selected = false;
- _mutex = new Glib::Mutex();
_main_loop = g_main_loop_new(g_main_context_default(), FALSE);
+#if GLIB_CHECK_VERSION(2,32,0)
+ _mutex = new Glib::Threads::Mutex();
+ if(Glib::Threads::Thread::create(sigc::mem_fun(*this, &FileOpenDialogImplWin32::GetOpenFileName_thread)))
+#else
+ _mutex = new Glib::Mutex();
if(Glib::Thread::create(sigc::mem_fun(*this, &FileOpenDialogImplWin32::GetOpenFileName_thread), true))
+#endif
{
while(1)
{
@@ -1870,15 +1884,21 @@ void FileSaveDialogImplWin32::GetSaveFileName_thread()
bool
FileSaveDialogImplWin32::show()
{
+#if !GLIB_CHECK_VERSION(2,32,0)
if(!Glib::thread_supported())
Glib::thread_init();
+#endif
_result = false;
_main_loop = g_main_loop_new(g_main_context_default(), FALSE);
if(_main_loop != NULL)
{
+#if GLIB_CHECK_VERSION(2,32,0)
+ if(Glib::Threads::Thread::create(sigc::mem_fun(*this, &FileSaveDialogImplWin32::GetSaveFileName_thread)))
+#else
if(Glib::Thread::create(sigc::mem_fun(*this, &FileSaveDialogImplWin32::GetSaveFileName_thread), true))
+#endif
g_main_loop_run(_main_loop);
if(_result && _extension)
diff --git a/src/ui/dialog/filedialogimpl-win32.h b/src/ui/dialog/filedialogimpl-win32.h
index 15953f9d8..e9d8829f7 100644
--- a/src/ui/dialog/filedialogimpl-win32.h
+++ b/src/ui/dialog/filedialogimpl-win32.h
@@ -226,7 +226,11 @@ private:
/// This mutex is used to ensure that the worker thread
/// that calls GetOpenFileName cannot collide with the
/// main Inkscape thread
+#if GLIB_CHECK_VERSION(2,32,0)
+ Glib::Threads::Mutex *_mutex;
+#else
Glib::Mutex *_mutex;
+#endif
/// The controller function for the thread which calls
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index 418132abb..50f30e8f4 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -1730,8 +1730,6 @@ bool FilterEffectsDialog::PrimitiveList::on_draw_signal(const Cairo::RefPtr<Cair
(bg_color_active.green + fg_color_active.green)/2.0,
(bg_color_active.blue + fg_color_active.blue)/2.0,
(bg_color_active.alpha + fg_color_active.alpha)/2.0};
-
- GdkRGBA black = {0,0,0,1};
#else
GtkStyle *style = gtk_widget_get_style(GTK_WIDGET(gobj()));
#endif
@@ -1902,11 +1900,7 @@ bool FilterEffectsDialog::PrimitiveList::on_draw_signal(const Cairo::RefPtr<Cair
// Draw drag connection
if(row_prim == prim && _in_drag) {
cr->save();
-#if GTK_CHECK_VERSION(3,0,0)
- gdk_cairo_set_source_rgba(cr->cobj(), &black);
-#else
- gdk_cairo_set_source_color(cr->cobj(), &(style->black));
-#endif
+ cr->set_source_rgb(0.0, 0.0, 0.0);
cr->move_to(outline_x, con_drag_y);
cr->line_to(mx, con_drag_y);
cr->line_to(mx, my);
@@ -1936,8 +1930,6 @@ void FilterEffectsDialog::PrimitiveList::draw_connection(const Cairo::RefPtr<Cai
(bg_color.green + fg_color.green)/2.0,
(bg_color.blue + fg_color.blue)/2.0,
(bg_color.alpha + fg_color.alpha)/2.0};
-
- GdkRGBA black = {0,0,0,1};
#else
GtkStyle *style = gtk_widget_get_style(GTK_WIDGET(gobj()));
#endif
@@ -1955,17 +1947,14 @@ void FilterEffectsDialog::PrimitiveList::draw_connection(const Cairo::RefPtr<Cai
const int tw = get_input_type_width();
gint end_x = text_start_x + tw * src_id + (int)(tw * 0.5f) + 1;
-#if GTK_CHECK_VERSION(3,0,0)
if(use_default && is_first)
- gdk_cairo_set_source_rgba(cr->cobj(), &mid_color);
- else
- gdk_cairo_set_source_rgba(cr->cobj(), &black);
+#if GTK_CHECK_VERSION(3,0,0)
+ gdk_cairo_set_source_rgba(cr->cobj(), &mid_color);
#else
- if(use_default && is_first)
- gdk_cairo_set_source_color(cr->cobj(), &(style->dark[GTK_STATE_NORMAL]));
- else
- gdk_cairo_set_source_color(cr->cobj(), &(style->black));
+ gdk_cairo_set_source_color(cr->cobj(), &(style->dark[GTK_STATE_NORMAL]));
#endif
+ else
+ cr->set_source_rgb(0.0, 0.0, 0.0);
cr->rectangle(end_x-2, y1-2, 5, 5);
cr->fill_preserve();
@@ -1993,11 +1982,7 @@ void FilterEffectsDialog::PrimitiveList::draw_connection(const Cairo::RefPtr<Cai
const int y2 = rct.get_y() + rct.get_height();
// Draw a bevelled 'L'-shaped connection
-#if GTK_CHECK_VERSION(3,0,0)
- gdk_cairo_set_source_rgba(cr->cobj(), &black);
-#else
- gdk_cairo_set_source_color(cr->cobj(), &(style->black));
-#endif
+ cr->set_source_rgb(0.0, 0.0, 0.0);
cr->move_to(x1, y1);
cr->line_to(x2-fheight/4, y1);
cr->line_to(x2, y1-fheight/4);
diff --git a/src/ui/dialog/font-substitution.cpp b/src/ui/dialog/font-substitution.cpp
index 24588946e..07e73cec8 100644
--- a/src/ui/dialog/font-substitution.cpp
+++ b/src/ui/dialog/font-substitution.cpp
@@ -260,7 +260,7 @@ Glib::ustring FontSubstitution::getSubstituteFontName (Glib::ustring font)
font_instance *res = (font_factory::Default())->Face(descr);
if (res->pFont) {
PangoFontDescription *nFaceDesc = pango_font_describe(res->pFont);
- out = pango_font_description_get_family(nFaceDesc);
+ out = sp_font_description_get_family(nFaceDesc);
}
pango_font_description_free(descr);
diff --git a/src/ui/dialog/input.cpp b/src/ui/dialog/input.cpp
index 6aff67f69..1df0d606e 100644
--- a/src/ui/dialog/input.cpp
+++ b/src/ui/dialog/input.cpp
@@ -999,7 +999,7 @@ InputDialogImpl::ConfPanel::ConfPanel() :
titleLabel(""),
axisFrame(_("Axes")),
keysFrame(_("Keys")),
- modeLabel(_("Mode")),
+ modeLabel(_("Mode:")),
modeBox(false, 4)
{
diff --git a/src/ui/dialog/object-properties.cpp b/src/ui/dialog/object-properties.cpp
index f0801734a..0800346f7 100644
--- a/src/ui/dialog/object-properties.cpp
+++ b/src/ui/dialog/object-properties.cpp
@@ -69,15 +69,25 @@ ObjectProperties::ObjectProperties (void) :
subselChangedConn()
{
//initialize labels for the table at the bottom of the dialog
- int_labels.push_back("onclick");
- int_labels.push_back("onmouseover");
- int_labels.push_back("onmouseout");
- int_labels.push_back("onmousedown");
- int_labels.push_back("onmouseup");
- int_labels.push_back("onmousemove");
- int_labels.push_back("onfocusin");
- int_labels.push_back("onfocusout");
- int_labels.push_back("onload");
+ int_attrs.push_back("onclick");
+ int_attrs.push_back("onmouseover");
+ int_attrs.push_back("onmouseout");
+ int_attrs.push_back("onmousedown");
+ int_attrs.push_back("onmouseup");
+ int_attrs.push_back("onmousemove");
+ int_attrs.push_back("onfocusin");
+ int_attrs.push_back("onfocusout");
+ int_attrs.push_back("onload");
+
+ int_labels.push_back("onclick:");
+ int_labels.push_back("onmouseover:");
+ int_labels.push_back("onmouseout:");
+ int_labels.push_back("onmousedown:");
+ int_labels.push_back("onmouseup:");
+ int_labels.push_back("onmousemove:");
+ int_labels.push_back("onfocusin:");
+ int_labels.push_back("onfocusout:");
+ int_labels.push_back("onload:");
desktopChangeConn = deskTrack.connectDesktopChanged( sigc::mem_fun(*this, &ObjectProperties::setTargetDesktop) );
deskTrack.connect(GTK_WIDGET(gobj()));
@@ -291,7 +301,7 @@ void ObjectProperties::widget_setup(void)
if (CurrentItem == NULL)
{
- attrTable.set_object(obj, int_labels, int_labels, (GtkWidget*)EInteractivity.gobj());
+ attrTable.set_object(obj, int_labels, int_attrs, (GtkWidget*)EInteractivity.gobj());
}
else
{
diff --git a/src/ui/dialog/object-properties.h b/src/ui/dialog/object-properties.h
index 0bf622ce4..a04c62bec 100644
--- a/src/ui/dialog/object-properties.h
+++ b/src/ui/dialog/object-properties.h
@@ -67,6 +67,7 @@ public:
private:
bool blocked;
SPItem *CurrentItem; //to store the current item, for not wasting resources
+ std::vector<Glib::ustring> int_attrs;
std::vector<Glib::ustring> int_labels;
Gtk::Table TopTable; //the table with the object properties
diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp
index 71674368b..97d8b0523 100644
--- a/src/ui/dialog/symbols.cpp
+++ b/src/ui/dialog/symbols.cpp
@@ -432,6 +432,9 @@ void SymbolsDialog::get_symbols() {
GSList* SymbolsDialog::symbols_in_doc_recursive (SPObject *r, GSList *l)
{
+ if (!r) {
+ return l;
+ }
// Stop multiple counting of same symbol
if( SP_IS_USE(r) ) {