summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 57d4715)
raw | patch | inline | side by side (parent: 57d4715)
author | JucaBlues <JucaBlues@users.sourceforge.net> | |
Mon, 9 Feb 2009 17:20:32 +0000 (17:20 +0000) | ||
committer | JucaBlues <JucaBlues@users.sourceforge.net> | |
Mon, 9 Feb 2009 17:20:32 +0000 (17:20 +0000) |
due to JonCruz considerations about the proper way of doing it.
index 4b2976a620e4ba020fd260f3dabf20eba33bc643..7ab5c099bd9874e95e3c8945f6ba8b194394d56c 100644 (file)
--- a/src/dialogs/swatches.cpp
+++ b/src/dialogs/swatches.cpp
TEXT_DATA
} colorFlavorType;
+//TODO: warning: deprecated conversion from string constant to ‘gchar*’
+//
+//Turn out to be warnings that we should probably leave in place. The
+// pointers/types used need to be read-only. So until we correct the using
+// code, those warnings are actually desired. They say "Hey! Fix this". We
+// definitely don't want to hide/ignore them. --JonCruz
static const GtkTargetEntry sourceColorEntries[] = {
#if ENABLE_MAGIC_COLORS
-// {(gchar*) "application/x-inkscape-color-id", GTK_TARGET_SAME_APP, APP_X_INKY_COLOR_ID},
- {(gchar*) "application/x-inkscape-color", 0, APP_X_INKY_COLOR},
+// {"application/x-inkscape-color-id", GTK_TARGET_SAME_APP, APP_X_INKY_COLOR_ID},
+ {"application/x-inkscape-color", 0, APP_X_INKY_COLOR},
#endif // ENABLE_MAGIC_COLORS
- {(gchar*) "application/x-color", 0, APP_X_COLOR},
- {(gchar*) "text/plain", 0, TEXT_DATA},
+ {"application/x-color", 0, APP_X_COLOR},
+ {"text/plain", 0, TEXT_DATA},
};
void ColorItem::_dragGetColorData( GtkWidget *widget,
g_message("die die die %p %p", obj, user_data );
}
+//TODO: warning: deprecated conversion from string constant to ‘gchar*’
+//
+//Turn out to be warnings that we should probably leave in place. The
+// pointers/types used need to be read-only. So until we correct the using
+// code, those warnings are actually desired. They say "Hey! Fix this". We
+// definitely don't want to hide/ignore them. --JonCruz
static const GtkTargetEntry destColorTargets[] = {
#if ENABLE_MAGIC_COLORS
-// {(gchar*) "application/x-inkscape-color-id", GTK_TARGET_SAME_APP, APP_X_INKY_COLOR_ID},
- {(gchar*) "application/x-inkscape-color", 0, APP_X_INKY_COLOR},
+// {"application/x-inkscape-color-id", GTK_TARGET_SAME_APP, APP_X_INKY_COLOR_ID},
+ {"application/x-inkscape-color", 0, APP_X_INKY_COLOR},
#endif // ENABLE_MAGIC_COLORS
- {(gchar*) "application/x-color", 0, APP_X_COLOR},
+ {"application/x-color", 0, APP_X_COLOR},
};
#include "color.h" // for SP_RGBA32_U_COMPOSE
index 3dd6d31bd1f57c6462aabf4c82e0858704ed67fe..048207332eb80789907023ac972bdd4113db8623 100644 (file)
@@ -111,8 +111,8 @@ Filter::merge_filters (Inkscape::XML::Node * to, Inkscape::XML::Node * from, Ink
}
}
-#define FILTER_SRC_GRAPHIC (gchar*) "fbSourceGraphic"
-#define FILTER_SRC_GRAPHIC_ALPHA (gchar*) "fbSourceGraphicAlpha"
+#define FILTER_SRC_GRAPHIC "fbSourceGraphic"
+#define FILTER_SRC_GRAPHIC_ALPHA "fbSourceGraphicAlpha"
void
Filter::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document, Inkscape::Extension::Implementation::ImplementationDocumentCache * docCache)
index d1f9d677c7abe7aa01407a1f822e479eeee82c6a..cf0f55f2cd0c84707d6ac932c19eec87c2324850 100644 (file)
GtkType sp_view_widget_get_type(void)
{
static GtkType type = 0;
-
+ //TODO: switch to GObject
+ // GtkType and such calls were deprecated a while back with the
+ // introduction of GObject as a separate layer, with GType instead. --JonCruz
if (!type) {
GtkTypeInfo info = {
(gchar*) "SPViewWidget",
index 90ef79b92f993a2ff12d8b47860c2a435e44d44a..9a536487430dfb1efd4c02d6147f120d5d886f2c 100644 (file)
APP_X_COLOR
} ui_drop_target_info;
+//TODO: warning: deprecated conversion from string constant to ‘gchar*’
+//
+//Turn out to be warnings that we should probably leave in place. The
+// pointers/types used need to be read-only. So until we correct the using
+// code, those warnings are actually desired. They say "Hey! Fix this". We
+// definitely don't want to hide/ignore them. --JonCruz
static GtkTargetEntry ui_drop_target_entries [] = {
- {(gchar*) "application/x-color", 0, APP_X_COLOR}
+ {"application/x-color", 0, APP_X_COLOR}
};
#define ENTRIES_SIZE(n) sizeof(n)/sizeof(n[0])
index d13e8fd1224e8754aa35c480ee920fb8fba812f5..11d2d528aa022bedc5f38c613a29951377499fe6 100644 (file)
GtkType
sp_gradient_image_get_type (void)
{
+ //TODO: switch to GObject
+ // GtkType and such calls were deprecated a while back with the
+ // introduction of GObject as a separate layer, with GType instead. --JonCruz
+
static GtkType type = 0;
if (!type) {
GtkTypeInfo info = {
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index dccd0916e48d50e027b3e88a9a579920b1871549..35ab1842d4ebc3052fd531ebe9a39c20af4ee98b 100644 (file)
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
GtkType
sp_icon_get_type()
{
+ //TODO: switch to GObject
+ // GtkType and such calls were deprecated a while back with the
+ // introduction of GObject as a separate layer, with GType instead. --JonCruz
+
static GtkType type = 0;
if (!type) {
GtkTypeInfo info = {
diff --git a/src/widgets/ruler.cpp b/src/widgets/ruler.cpp
index d4ff91f3cc60e852b90f4df7e00c49292a0c9d56..7e347acade59c04a990a77db49e9e2fa47017685 100644 (file)
--- a/src/widgets/ruler.cpp
+++ b/src/widgets/ruler.cpp
GtkType
sp_hruler_get_type (void)
{
+ //TODO: switch to GObject
+ // GtkType and such calls were deprecated a while back with the
+ // introduction of GObject as a separate layer, with GType instead. --JonCruz
+
static GtkType hruler_type = 0;
if (!hruler_type)
GtkType
sp_vruler_get_type (void)
{
+ //TODO: switch to GObject
+ // GtkType and such calls were deprecated a while back with the
+ // introduction of GObject as a separate layer, with GType instead. --JonCruz
+
static GtkType vruler_type = 0;
if (!vruler_type)
} while (parent != NULL);
}
+//TODO: warning: deprecated conversion from string constant to ‘gchar*’
+//
+//Turn out to be warnings that we should probably leave in place. The
+// pointers/types used need to be read-only. So until we correct the using
+// code, those warnings are actually desired. They say "Hey! Fix this". We
+// definitely don't want to hide/ignore them. --JonCruz
/// Ruler metrics.
static GtkRulerMetric const sp_ruler_metrics[] = {
// NOTE: the order of records in this struct must correspond to the SPMetric enum.
- {(gchar*) "NONE", (gchar*) "", 1, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
- {(gchar*) "millimeters", (gchar*) "mm", PX_PER_MM, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
- {(gchar*) "centimeters", (gchar*) "cm", PX_PER_CM, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
- {(gchar*) "inches", (gchar*) "in", PX_PER_IN, { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 }, { 1, 2, 4, 8, 16 }},
- {(gchar*) "feet", (gchar*) "ft", PX_PER_FT, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
- {(gchar*) "points", (gchar*) "pt", PX_PER_PT, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
- {(gchar*) "picas", (gchar*) "pc", PX_PER_PC, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
- {(gchar*) "pixels", (gchar*) "px", PX_PER_PX, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
- {(gchar*) "meters", (gchar*) "m", PX_PER_M, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
+ {"NONE", "", 1, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
+ {"millimeters", "mm", PX_PER_MM, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
+ {"centimeters", "cm", PX_PER_CM, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
+ {"inches", "in", PX_PER_IN, { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 }, { 1, 2, 4, 8, 16 }},
+ {"feet", "ft", PX_PER_FT, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
+ {"points", "pt", PX_PER_PT, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
+ {"picas", "pc", PX_PER_PC, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
+ {"pixels", "px", PX_PER_PX, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
+ {"meters", "m", PX_PER_M, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
};
void
index 14a7fb5b2a8665789a71a5127abfb2a8baeb8712..b8eb899cc7259223ee70a3f6379b5de05948cc44 100644 (file)
GtkType
sp_color_slider_get_type (void)
{
+ //TODO: switch to GObject
+ // GtkType and such calls were deprecated a while back with the
+ // introduction of GObject as a separate layer, with GType instead. --JonCruz
+
static GtkType type = 0;
if (!type) {
GtkTypeInfo info = {
index afa707904b423f56528e4c6a70a174ae37a9b3d6..f694c461ce5ca877eafdf5ccf998c500b906d39a 100644 (file)
GtkType
sp_widget_get_type (void)
{
+ //TODO: switch to GObject
+ // GtkType and such calls were deprecated a while back with the
+ // introduction of GObject as a separate layer, with GType instead. --JonCruz
+
static GtkType type = 0;
if (!type) {
static const GtkTypeInfo info = {
index d9d208857868b329ecd53dfb36ac60426b624615..698ee81ee7cd7cd1a6a15c3fcae94746dac9a168 100644 (file)
GtkType
sp_xmlview_tree_get_type (void)
{
+ //TODO: switch to GObject
+ // GtkType and such calls were deprecated a while back with the
+ // introduction of GObject as a separate layer, with GType instead. --JonCruz
+
static GtkType type = 0;
if (!type) {