[gnumeric] Icons: register unknown_image even in ssconvert.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Icons: register unknown_image even in ssconvert.
- Date: Tue, 6 Mar 2012 17:50:01 +0000 (UTC)
commit 46b7e0a2c3698c7e44f74d8e41de21543e971698
Author: Morten Welinder <terra gnome org>
Date: Tue Mar 6 12:48:51 2012 -0500
Icons: register unknown_image even in ssconvert.
ChangeLog | 9 ++++++
NEWS | 5 +++-
src/application.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++
src/wbc-gtk.c | 77 ---------------------------------------------------
4 files changed, 92 insertions(+), 78 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index caa49c5..c5c7d9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-03-06 Morten Welinder <terra gnome org>
+
+ * src/application.c (install_icons): Move icon installation to
+ here. We need unknown_image even without the gui.
+ (gnm_app_class_init): Hook it up here.
+
+ * src/wbc-gtk.c: Move from here.
+ (wbc_gtk_class_init): Instead of here.
+
2012-03-02 Morten Welinder <terra gnome org>
* configure.in: Post-release bump.
diff --git a/NEWS b/NEWS
index f3499a1..6c6e081 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,10 @@ Gnumeric 1.11.3
Andreas:
* On ODF import of stacked column charts, set LibreOffice's default overlap.
- [#670692]
+ [#670692]
+
+Morten:
+ * Hook up unknown_image icon for ssconvert too.
--------------------------------------------------------------------------
Gnumeric 1.11.2
diff --git a/src/application.c b/src/application.c
index 6210e83..17293c1 100644
--- a/src/application.c
+++ b/src/application.c
@@ -682,6 +682,83 @@ gnumeric_application_get_property (GObject *obj, guint param_id,
}
static void
+install_icons (void)
+{
+ static struct {
+ guchar const *scalable_data;
+ gchar const *name;
+ } const entry [] = {
+ /* Cursors */
+ { gnm_cursor_cross, "cursor_cross" },
+ { gnm_bucket, "bucket" },
+ { gnm_font, "font" },
+ { sheet_move_marker, "sheet_move_marker" },
+ /* Patterns */
+ { gp_125grey, "gp_125grey" },
+ { gp_25grey, "gp_25grey" },
+ { gp_50grey, "gp_50grey" },
+ { gp_625grey, "gp_625grey" },
+ { gp_75grey, "gp_75grey" },
+ { gp_bricks, "gp_bricks" },
+ { gp_diag, "gp_diag" },
+ { gp_diag_cross, "gp_diag_cross" },
+ { gp_foreground_solid, "gp_foreground_solid" },
+ { gp_horiz, "gp_horiz" },
+ { gp_large_circles, "gp_large_circles" },
+ { gp_rev_diag, "gp_rev_diag" },
+ { gp_semi_circle, "gp_semi_circle" },
+ { gp_small_circle, "gp_small_circle" },
+ { gp_solid, "gp_solid" },
+ { gp_thatch, "gp_thatch" },
+ { gp_thick_diag_cross, "gp_thick_diag_cross" },
+ { gp_thin_diag, "gp_thin_diag" },
+ { gp_thin_diag_cross, "gp_thin_diag_cross" },
+ { gp_thin_horiz, "gp_thin_horiz" },
+ { gp_thin_horiz_cross, "gp_thin_horiz_cross" },
+ { gp_thin_rev_diag, "gp_thin_rev_diag" },
+ { gp_thin_vert, "gp_thin_vert" },
+ { gp_vert, "gp_vert" },
+ { line_pattern_dash_dot, "line_pattern_dash_dot" },
+ { line_pattern_dash_dot_dot, "line_pattern_dash_dot_dot" },
+ { line_pattern_dashed, "line_pattern_dashed" },
+ { line_pattern_dotted, "line_pattern_dotted" },
+ { line_pattern_double, "line_pattern_double" },
+ { line_pattern_hair, "line_pattern_hair" },
+ { line_pattern_medium, "line_pattern_medium" },
+ { line_pattern_medium_dash, "line_pattern_medium_dash" },
+ { line_pattern_medium_dash_dot, "line_pattern_medium_dash_dot" },
+ { line_pattern_medium_dash_dot_dot, "line_pattern_medium_dash_dot_dot" },
+ { line_pattern_slant, "line_pattern_slant" },
+ { line_pattern_thick, "line_pattern_thick" },
+ { line_pattern_thin, "line_pattern_thin" },
+ /* Borders */
+ { bottom_border, "bottom_border" },
+ { diag_border, "diag_border" },
+ { inside_border, "inside_border" },
+ { inside_horiz_border, "inside_horiz_border" },
+ { inside_vert_border, "inside_vert_border" },
+ { left_border, "left_border" },
+ { no_border, "no_border" },
+ { outline_border, "outline_border" },
+ { rev_diag_border, "rev_diag_border" },
+ { right_border, "right_border" },
+ { top_border, "top_border" },
+ /* Stuff */
+ { unknown_image, "unknown_image" }
+ };
+ unsigned int ui;
+
+ for (ui = 0; ui < G_N_ELEMENTS (entry); ui++) {
+ GdkPixbuf *pixbuf = gdk_pixbuf_new_from_inline
+ (-1, entry[ui].scalable_data, FALSE, NULL);
+ gtk_icon_theme_add_builtin_icon (entry[ui].name,
+ gdk_pixbuf_get_width (pixbuf), pixbuf);
+ g_object_unref (pixbuf);
+ }
+}
+
+
+static void
gnm_app_class_init (GObjectClass *gobject_klass)
{
parent_klass = g_type_class_peek_parent (gobject_klass);
@@ -750,6 +827,8 @@ gnm_app_class_init (GObjectClass *gobject_klass)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+
+ install_icons ();
}
static void
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index dc80193..55bf369 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -4249,82 +4249,6 @@ cb_wbcg_window_state_event (GtkWidget *widget,
static void
-wbc_gtk_setup_pixmaps (void)
-{
- static struct {
- guchar const *scalable_data;
- gchar const *name;
- } const entry [] = {
- /* Cursors */
- { gnm_cursor_cross, "cursor_cross" },
- { gnm_bucket, "bucket" },
- { gnm_font, "font" },
- { sheet_move_marker, "sheet_move_marker" },
- /* Patterns */
- { gp_125grey, "gp_125grey" },
- { gp_25grey, "gp_25grey" },
- { gp_50grey, "gp_50grey" },
- { gp_625grey, "gp_625grey" },
- { gp_75grey, "gp_75grey" },
- { gp_bricks, "gp_bricks" },
- { gp_diag, "gp_diag" },
- { gp_diag_cross, "gp_diag_cross" },
- { gp_foreground_solid, "gp_foreground_solid" },
- { gp_horiz, "gp_horiz" },
- { gp_large_circles, "gp_large_circles" },
- { gp_rev_diag, "gp_rev_diag" },
- { gp_semi_circle, "gp_semi_circle" },
- { gp_small_circle, "gp_small_circle" },
- { gp_solid, "gp_solid" },
- { gp_thatch, "gp_thatch" },
- { gp_thick_diag_cross, "gp_thick_diag_cross" },
- { gp_thin_diag, "gp_thin_diag" },
- { gp_thin_diag_cross, "gp_thin_diag_cross" },
- { gp_thin_horiz, "gp_thin_horiz" },
- { gp_thin_horiz_cross, "gp_thin_horiz_cross" },
- { gp_thin_rev_diag, "gp_thin_rev_diag" },
- { gp_thin_vert, "gp_thin_vert" },
- { gp_vert, "gp_vert" },
- { line_pattern_dash_dot, "line_pattern_dash_dot" },
- { line_pattern_dash_dot_dot, "line_pattern_dash_dot_dot" },
- { line_pattern_dashed, "line_pattern_dashed" },
- { line_pattern_dotted, "line_pattern_dotted" },
- { line_pattern_double, "line_pattern_double" },
- { line_pattern_hair, "line_pattern_hair" },
- { line_pattern_medium, "line_pattern_medium" },
- { line_pattern_medium_dash, "line_pattern_medium_dash" },
- { line_pattern_medium_dash_dot, "line_pattern_medium_dash_dot" },
- { line_pattern_medium_dash_dot_dot, "line_pattern_medium_dash_dot_dot" },
- { line_pattern_slant, "line_pattern_slant" },
- { line_pattern_thick, "line_pattern_thick" },
- { line_pattern_thin, "line_pattern_thin" },
- /* Borders */
- { bottom_border, "bottom_border" },
- { diag_border, "diag_border" },
- { inside_border, "inside_border" },
- { inside_horiz_border, "inside_horiz_border" },
- { inside_vert_border, "inside_vert_border" },
- { left_border, "left_border" },
- { no_border, "no_border" },
- { outline_border, "outline_border" },
- { rev_diag_border, "rev_diag_border" },
- { right_border, "right_border" },
- { top_border, "top_border" },
- /* Stuff */
- { unknown_image, "unknown_image" }
- };
- unsigned int ui;
-
- for (ui = 0; ui < G_N_ELEMENTS (entry); ui++) {
- GdkPixbuf *pixbuf = gdk_pixbuf_new_from_inline
- (-1, entry[ui].scalable_data, FALSE, NULL);
- gtk_icon_theme_add_builtin_icon (entry[ui].name,
- gdk_pixbuf_get_width (pixbuf), pixbuf);
- g_object_unref (pixbuf);
- }
-}
-
-static void
add_icon (GtkIconFactory *factory,
guchar const *scalable_data,
guchar const *sized_data,
@@ -5552,7 +5476,6 @@ wbc_gtk_class_init (GObjectClass *gobject_class)
wbc_class->init_state = wbc_gtk_init_state;
wbc_class->style_feedback = wbc_gtk_style_feedback;
- wbc_gtk_setup_pixmaps ();
wbc_gtk_setup_icons ();
g_object_class_install_property (gobject_class,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]