From f35bb1f74a0ffeb5c6477a25e3c4cde87a97bcf1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 12:06:06 +0200 Subject: Removed unused includes, decrease compilation time (bzr r15025) --- src/widgets/font-selector.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/widgets/font-selector.cpp') diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index aefcb2e81..2ed6705d7 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -16,21 +16,16 @@ */ #ifdef HAVE_CONFIG_H -# include "config.h" +#include #endif #include #include -#include <2geom/transforms.h> - -#include - #include #include "desktop.h" #include "widgets/font-selector.h" -#include "preferences.h" /* SPFontSelector */ -- cgit v1.2.3 From 43b49e325db73cc19b1731db6c69545664ee8fbe Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 13:26:17 +0200 Subject: Reverted changes to r15024 after many building problems (bzr r15027) --- src/widgets/font-selector.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/widgets/font-selector.cpp') diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index 2ed6705d7..aefcb2e81 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -16,16 +16,21 @@ */ #ifdef HAVE_CONFIG_H -#include +# include "config.h" #endif #include #include +#include <2geom/transforms.h> + +#include + #include #include "desktop.h" #include "widgets/font-selector.h" +#include "preferences.h" /* SPFontSelector */ -- cgit v1.2.3 From 49a7927ecf31ace696e9e5770e8d6543c356db7a Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Thu, 28 Jul 2016 19:15:34 +0100 Subject: Finish removing GTK+ 2 fallbacks (bzr r15023.2.8) --- src/widgets/font-selector.cpp | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) (limited to 'src/widgets/font-selector.cpp') diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index aefcb2e81..54b693ce0 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -36,11 +36,7 @@ struct SPFontSelector { -#if GTK_CHECK_VERSION(3,0,0) GtkBox hbox; -#else - GtkHBox hbox; -#endif unsigned int block_emit : 1; @@ -61,11 +57,7 @@ struct SPFontSelector struct SPFontSelectorClass { -#if GTK_CHECK_VERSION(3,0,0) GtkBoxClass parent_class; -#else - GtkHBoxClass parent_class; -#endif void (* font_set) (SPFontSelector *fsel, gchar *fontspec); }; @@ -91,11 +83,7 @@ static void sp_font_selector_set_sizes( SPFontSelector *fsel ); static guint fs_signals[LAST_SIGNAL] = { 0 }; -#if GTK_CHECK_VERSION(3,0,0) G_DEFINE_TYPE(SPFontSelector, sp_font_selector, GTK_TYPE_BOX); -#else -G_DEFINE_TYPE(SPFontSelector, sp_font_selector, GTK_TYPE_HBOX); -#endif static void sp_font_selector_class_init(SPFontSelectorClass *c) { @@ -160,8 +148,7 @@ static void sp_font_selector_init(SPFontSelector *fsel) /* Muck with style, see text-toolbar.cpp */ gtk_widget_set_name( GTK_WIDGET(fsel->family_treeview), "font_selector_family" ); -#if GTK_CHECK_VERSION(3,0,0) - GtkCssProvider *css_provider = gtk_css_provider_new(); + auto css_provider = gtk_css_provider_new(); gtk_css_provider_load_from_data(css_provider, "#font_selector_family {\n" " -GtkWidget-wide-separators: true;\n" @@ -169,14 +156,10 @@ static void sp_font_selector_init(SPFontSelector *fsel) "}\n", -1, NULL); - GdkScreen *screen = gdk_screen_get_default(); + auto screen = gdk_screen_get_default(); gtk_style_context_add_provider_for_screen(screen, GTK_STYLE_PROVIDER(css_provider), GTK_STYLE_PROVIDER_PRIORITY_USER); -#else - gtk_rc_parse_string ( - "widget \"*font_selector_family\" style \"fontfamily-separator-style\""); -#endif Inkscape::FontLister* fontlister = Inkscape::FontLister::get_instance(); Glib::RefPtr store = fontlister->get_font_list(); @@ -195,12 +178,8 @@ static void sp_font_selector_init(SPFontSelector *fsel) gtk_widget_show(f); gtk_box_pack_start(GTK_BOX (fsel), f, TRUE, TRUE, 0); -#if GTK_CHECK_VERSION(3,0,0) - GtkWidget *vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); + auto vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_set_homogeneous(GTK_BOX(vb), FALSE); -#else - GtkWidget *vb = gtk_vbox_new(FALSE, 4); -#endif gtk_widget_show(vb); gtk_container_set_border_width(GTK_CONTAINER (vb), 4); gtk_container_add(GTK_CONTAINER(f), vb); @@ -235,12 +214,8 @@ static void sp_font_selector_init(SPFontSelector *fsel) selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(fsel->style_treeview)); g_signal_connect (G_OBJECT(selection), "changed", G_CALLBACK (sp_font_selector_style_select_row), fsel); -#if GTK_CHECK_VERSION(3,0,0) - GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); + auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); gtk_box_set_homogeneous(GTK_BOX(hb), FALSE); -#else - GtkWidget *hb = gtk_hbox_new(FALSE, 4); -#endif gtk_widget_show(hb); gtk_box_pack_start(GTK_BOX(vb), hb, FALSE, FALSE, 0); -- cgit v1.2.3 From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/widgets/font-selector.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/widgets/font-selector.cpp') diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index aefcb2e81..2ed6705d7 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -16,21 +16,16 @@ */ #ifdef HAVE_CONFIG_H -# include "config.h" +#include #endif #include #include -#include <2geom/transforms.h> - -#include - #include #include "desktop.h" #include "widgets/font-selector.h" -#include "preferences.h" /* SPFontSelector */ -- cgit v1.2.3 From a796d4f9aafacf8a177c36cf50881366e450b817 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Thu, 1 Sep 2016 15:10:48 +0200 Subject: Make GTK3 width of Text and Font dialog more reasonable. (bzr r15099) --- src/widgets/font-selector.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/widgets/font-selector.cpp') diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index 4822020be..f400de89c 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -110,8 +110,8 @@ static void sp_font_selector_set_size_tooltip(SPFontSelector *fsel) */ static void sp_font_selector_init(SPFontSelector *fsel) { - gtk_box_set_homogeneous(GTK_BOX(fsel), TRUE); - gtk_box_set_spacing(GTK_BOX(fsel), 4); + //gtk_box_set_homogeneous(GTK_BOX(fsel), TRUE); + //gtk_box_set_spacing(GTK_BOX(fsel), 4); /* Family frame */ GtkWidget *f = gtk_frame_new(_("Font family")); @@ -133,6 +133,7 @@ static void sp_font_selector_init(SPFontSelector *fsel) GtkTreeViewColumn *column = gtk_tree_view_column_new (); GtkCellRenderer *cell = gtk_cell_renderer_text_new (); gtk_tree_view_column_pack_start (column, cell, FALSE); + gtk_tree_view_column_set_fixed_width (column, 200); gtk_tree_view_column_set_attributes (column, cell, "text", 0, NULL); gtk_tree_view_column_set_cell_data_func (column, cell, GtkTreeCellDataFunc (font_lister_cell_data_func), @@ -171,7 +172,7 @@ static void sp_font_selector_init(SPFontSelector *fsel) /* Style frame */ f = gtk_frame_new(C_("Font selector", "Style")); gtk_widget_show(f); - gtk_box_pack_start(GTK_BOX (fsel), f, TRUE, TRUE, 0); + gtk_box_pack_start(GTK_BOX (fsel), f, FALSE, TRUE, 0); auto vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_set_homogeneous(GTK_BOX(vb), FALSE); -- cgit v1.2.3 From 220cfde7cf46c644446730942576e1cb640b0af0 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Fri, 25 Nov 2016 12:28:44 +0100 Subject: Remove deprecated GtkWidget:wide-seperators which is ignored as of 3.20. (bzr r15271) --- src/widgets/font-selector.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/widgets/font-selector.cpp') diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index f400de89c..370b01f2f 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -147,7 +147,6 @@ static void sp_font_selector_init(SPFontSelector *fsel) auto css_provider = gtk_css_provider_new(); gtk_css_provider_load_from_data(css_provider, "#font_selector_family {\n" - " -GtkWidget-wide-separators: true;\n" " -GtkWidget-separator-height: 6;\n" "}\n", -1, NULL); -- cgit v1.2.3 From e47fd7d0b4189297581c3e8b4fbf349c5c26c830 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Fri, 25 Nov 2016 12:47:51 +0100 Subject: Remove deprecated GtkWidget-separator-height, ignored as of 3.20. (bzr r15272) --- src/widgets/font-selector.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/widgets/font-selector.cpp') diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index 370b01f2f..819ac77b6 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -145,12 +145,6 @@ static void sp_font_selector_init(SPFontSelector *fsel) gtk_widget_set_name( GTK_WIDGET(fsel->family_treeview), "font_selector_family" ); auto css_provider = gtk_css_provider_new(); - gtk_css_provider_load_from_data(css_provider, - "#font_selector_family {\n" - " -GtkWidget-separator-height: 6;\n" - "}\n", - -1, NULL); - auto screen = gdk_screen_get_default(); gtk_style_context_add_provider_for_screen(screen, GTK_STYLE_PROVIDER(css_provider), -- cgit v1.2.3