summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2012-04-30 23:08:33 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2012-04-30 23:08:33 +0000
commit7a38f66b0aefb8da58dd26ec51e4de53e8d1cf95 (patch)
treeefe8370f02cbc6114d100c63ebbc24ad30893bcb
parentgtkmm-3.0 changes for Gtk::Adjustment (diff)
downloadinkscape-7a38f66b0aefb8da58dd26ec51e4de53e8d1cf95.tar.gz
inkscape-7a38f66b0aefb8da58dd26ec51e4de53e8d1cf95.zip
Fix typos in Gtk3 fixes, and fix separator API usage
(bzr r11309)
-rw-r--r--src/desktop.cpp2
-rw-r--r--src/dialogs/find.cpp10
-rw-r--r--src/document-undo.cpp2
-rw-r--r--src/document-undo.h4
-rw-r--r--src/extension/internal/pdf-input-cairo.cpp1
-rw-r--r--src/extension/internal/pdfinput/pdf-input.cpp1
-rw-r--r--src/ui/dialog/floating-behavior.cpp1
-rw-r--r--src/ui/widget/licensor.cpp1
-rw-r--r--src/ui/widget/page-sizer.h1
-rw-r--r--src/ui/widget/panel.cpp1
-rw-r--r--src/widgets/desktop-widget.cpp17
-rw-r--r--src/widgets/font-selector.cpp2
-rw-r--r--src/widgets/paint-selector.cpp6
13 files changed, 33 insertions, 16 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 7aabb1245..30e0edc25 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -1403,7 +1403,7 @@ void SPDesktop::setWaitingCursor()
GdkCursor *waiting = gdk_cursor_new(GDK_WATCH);
gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(sp_desktop_canvas(this))), waiting);
#if GTK_CHECK_VERSION(3,0,0)
- g_cursor_unref(waiting);
+ g_object_unref(waiting);
#else
gdk_cursor_unref(waiting);
#endif
diff --git a/src/dialogs/find.cpp b/src/dialogs/find.cpp
index 3bd22b8eb..8653e42ae 100644
--- a/src/dialogs/find.cpp
+++ b/src/dialogs/find.cpp
@@ -555,7 +555,7 @@ sp_find_types ()
{
#if GTK_CHECK_VERSION(3,0,0)
GtkWidget *vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
- gtk_box_new(GTK_BOX(vb), FALSE);
+ gtk_box_set_homogeneous(GTK_BOX(vb), FALSE);
#else
GtkWidget *vb = gtk_vbox_new (FALSE, 4);
#endif
@@ -587,7 +587,7 @@ sp_find_types ()
{
#if GTK_CHECK_VERSION(3,0,0)
GtkWidget *vb_all = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
- gtk_box_new(GTK_BOX(vb_all), FALSE);
+ gtk_box_set_homogeneous(GTK_BOX(vb_all), FALSE);
#else
GtkWidget *vb_all = gtk_vbox_new (FALSE, 0);
#endif
@@ -735,7 +735,7 @@ sp_find_dialog_old (void)
/* Toplevel vbox */
#if GTK_CHECK_VERSION(3,0,0)
GtkWidget *vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
- gtk_box_new(GTK_BOX(vb), FALSE);
+ gtk_box_set_homogeneous(GTK_BOX(vb), FALSE);
#else
GtkWidget *vb = gtk_vbox_new (FALSE, 0);
#endif
@@ -753,7 +753,11 @@ sp_find_dialog_old (void)
gtk_box_pack_start (GTK_BOX (vb), types, FALSE, FALSE, 0);
{
+#if GTK_CHECK_VERSION(3,0,0)
+ GtkWidget *w = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
+#else
GtkWidget *w = gtk_hseparator_new ();
+#endif
gtk_widget_show (w);
gtk_box_pack_start (GTK_BOX (vb), w, FALSE, FALSE, 3);
diff --git a/src/document-undo.cpp b/src/document-undo.cpp
index 61c78fe8a..312ccb7f8 100644
--- a/src/document-undo.cpp
+++ b/src/document-undo.cpp
@@ -112,7 +112,7 @@ void Inkscape::DocumentUndo::done(SPDocument *doc, const unsigned int event_type
maybeDone(doc, NULL, event_type, event_description);
}
-void Inkscape::DocumentUndo::resetKey( Inkscape::Application * /*inkscape*/, SPDesktop * /*desktop*/, GtkObject *base )
+void Inkscape::DocumentUndo::resetKey( Inkscape::Application * /*inkscape*/, SPDesktop * /*desktop*/, GObject *base )
{
SPDocument *doc = reinterpret_cast<SPDocument *>(base);
doc->actionkey.clear();
diff --git a/src/document-undo.h b/src/document-undo.h
index 7ff45c269..087e12b5a 100644
--- a/src/document-undo.h
+++ b/src/document-undo.h
@@ -1,7 +1,7 @@
#ifndef SEEN_SP_DOCUMENT_UNDO_H
#define SEEN_SP_DOCUMENT_UNDO_H
-typedef struct _GtkObject GtkObject;
+typedef struct _GObject GObject;
class SPDesktop;
@@ -37,7 +37,7 @@ public:
static void maybeDone(SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring const &event_description);
- static void resetKey(Inkscape::Application *inkscape, SPDesktop *desktop, GtkObject *base);
+ static void resetKey(Inkscape::Application *inkscape, SPDesktop *desktop, GObject *base);
static void cancel(SPDocument *document);
diff --git a/src/extension/internal/pdf-input-cairo.cpp b/src/extension/internal/pdf-input-cairo.cpp
index e56b7afa8..5cb4f96c3 100644
--- a/src/extension/internal/pdf-input-cairo.cpp
+++ b/src/extension/internal/pdf-input-cairo.cpp
@@ -241,7 +241,6 @@ PdfImportCairoDialog::PdfImportCairoDialog(PopplerDocument *doc)
this->property_window_position().set_value(Gtk::WIN_POS_NONE);
this->set_resizable(true);
this->property_destroy_with_parent().set_value(false);
- this->set_has_separator(true);
this->add_action_widget(*cancelbutton, -6);
this->add_action_widget(*okbutton, -5);
cancelbutton->show();
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
index 47f91e7b2..d4fc6a8a2 100644
--- a/src/extension/internal/pdfinput/pdf-input.cpp
+++ b/src/extension/internal/pdfinput/pdf-input.cpp
@@ -257,7 +257,6 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc, const gchar */*uri*/)
this->property_window_position().set_value(Gtk::WIN_POS_NONE);
this->set_resizable(true);
this->property_destroy_with_parent().set_value(false);
- this->set_has_separator(true);
this->add_action_widget(*cancelbutton, -6);
this->add_action_widget(*okbutton, -5);
cancelbutton->show();
diff --git a/src/ui/dialog/floating-behavior.cpp b/src/ui/dialog/floating-behavior.cpp
index e69eb956e..105dfa9c2 100644
--- a/src/ui/dialog/floating-behavior.cpp
+++ b/src/ui/dialog/floating-behavior.cpp
@@ -41,7 +41,6 @@ FloatingBehavior::FloatingBehavior(Dialog &dialog) :
#endif
{
hide();
- _d->set_has_separator(false);
signal_delete_event().connect(sigc::mem_fun(_dialog, &Inkscape::UI::Dialog::Dialog::_onDeleteEvent));
diff --git a/src/ui/widget/licensor.cpp b/src/ui/widget/licensor.cpp
index 4a4a67bf3..d31d4b759 100644
--- a/src/ui/widget/licensor.cpp
+++ b/src/ui/widget/licensor.cpp
@@ -26,6 +26,7 @@
#include "inkscape.h"
#include "document-undo.h"
#include "verbs.h"
+#include <gtkmm/radiobutton.h>
namespace Inkscape {
diff --git a/src/ui/widget/page-sizer.h b/src/ui/widget/page-sizer.h
index e52303254..17fd7b1ea 100644
--- a/src/ui/widget/page-sizer.h
+++ b/src/ui/widget/page-sizer.h
@@ -22,6 +22,7 @@
#include <gtkmm/liststore.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/table.h>
+#include <gtkmm/radiobutton.h>
namespace Inkscape {
namespace XML {
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index b40bb75cd..a1ae6a36d 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -22,6 +22,7 @@
#include <gtkmm/stock.h>
#include <gtkmm/radiobutton.h>
#include <gtkmm/radiomenuitem.h>
+#include <gtkmm/separatormenuitem.h>
#include <gtk/gtk.h>
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index 71f7b8c17..6aecc4ada 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -525,7 +525,14 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
dtw->selected_style = new Inkscape::UI::Widget::SelectedStyle(true);
GtkHBox *ss_ = dtw->selected_style->gobj();
gtk_box_pack_start (GTK_BOX (dtw->statusbar), GTK_WIDGET(ss_), FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (dtw->statusbar), gtk_vseparator_new(), FALSE, FALSE, 0);
+
+ gtk_box_pack_start(GTK_BOX(dtw->statusbar),
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_separator_new(GTK_ORIENTATION_VERTICAL),
+#else
+ gtk_vseparator_new(),
+#endif
+ FALSE, FALSE, 0);
// connect scrollbar signals
g_signal_connect (G_OBJECT (dtw->hadj), "value-changed", G_CALLBACK (sp_desktop_widget_adjustment_value_changed), dtw);
@@ -554,7 +561,13 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
dtw->coord_status = gtk_table_new (5, 2, FALSE);
gtk_table_set_row_spacings(GTK_TABLE(dtw->coord_status), 0);
gtk_table_set_col_spacings(GTK_TABLE(dtw->coord_status), 2);
- gtk_table_attach(GTK_TABLE(dtw->coord_status), gtk_vseparator_new(), 0,1, 0,2, GTK_FILL, GTK_FILL, 0, 0);
+ gtk_table_attach(GTK_TABLE(dtw->coord_status),
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_separator_new(GTK_ORIENTATION_VERTICAL),
+#else
+ gtk_vseparator_new(),
+#endif
+ 0,1, 0,2, GTK_FILL, GTK_FILL, 0, 0);
eventbox = gtk_event_box_new ();
gtk_container_add (GTK_CONTAINER (eventbox), dtw->coord_status);
gtk_widget_set_tooltip_text (eventbox, _("Cursor coordinates"));
diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp
index ff361a6b8..affc6bed9 100644
--- a/src/widgets/font-selector.cpp
+++ b/src/widgets/font-selector.cpp
@@ -178,7 +178,7 @@ static void sp_font_selector_init(SPFontSelector *fsel)
#if GTK_CHECK_VERSION(3,0,0)
GtkWidget *vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
- gtk_box_new(GTK_BOX(vb), FALSE);
+ gtk_box_set_homogeneous(GTK_BOX(vb), FALSE);
#else
GtkWidget *vb = gtk_vbox_new(FALSE, 4);
#endif
diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp
index 075308321..c1147f9b0 100644
--- a/src/widgets/paint-selector.cpp
+++ b/src/widgets/paint-selector.cpp
@@ -290,7 +290,7 @@ sp_paint_selector_init(SPPaintSelector *psel)
#if GTK_CHECK_VERSION(3,0,0)
psel->frame = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
- gtk_box_new(GTK_BOX(psel->frame), FALSE);
+ gtk_box_set_homogeneous(GTK_BOX(psel->frame), FALSE);
#else
psel->frame = gtk_vbox_new(FALSE, 4);
#endif
@@ -664,7 +664,7 @@ static void sp_paint_selector_set_mode_color(SPPaintSelector *psel, SPPaintSelec
/* Create vbox */
#if GTK_CHECK_VERSION(3,0,0)
GtkWidget *vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
- gtk_box_new(GTK_BOX(vb), FALSE);
+ gtk_box_set_homogeneous(GTK_BOX(vb), FALSE);
#else
GtkWidget *vb = gtk_vbox_new(FALSE, 4);
#endif
@@ -1003,7 +1003,7 @@ static void sp_paint_selector_set_mode_pattern(SPPaintSelector *psel, SPPaintSel
/* Create vbox */
#if GTK_CHECK_VERSION(3,0,0)
tbl = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
- gtk_box_new(GTK_BOX(tbl), FALSE);
+ gtk_box_set_homogeneous(GTK_BOX(tbl), FALSE);
#else
tbl = gtk_vbox_new(FALSE, 4);
#endif