diff options
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/dash-selector.cpp | 24 | ||||
| -rw-r--r-- | src/widgets/gradient-selector.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/gradient-vector.cpp | 18 | ||||
| -rw-r--r-- | src/widgets/paint-selector.cpp | 6 | ||||
| -rw-r--r-- | src/widgets/sp-color-notebook.cpp | 6 | ||||
| -rw-r--r-- | src/widgets/spw-utilities.cpp | 22 |
6 files changed, 39 insertions, 39 deletions
diff --git a/src/widgets/dash-selector.cpp b/src/widgets/dash-selector.cpp index 6274215cf..7b96451ac 100644 --- a/src/widgets/dash-selector.cpp +++ b/src/widgets/dash-selector.cpp @@ -116,7 +116,7 @@ sp_dash_selector_init (SPDashSelector *dsel) GtkWidget *sb = gtk_spin_button_new (GTK_ADJUSTMENT (dsel->offset), 0.1, 2); gtk_tooltips_set_tip (tt, sb, _("Pattern offset"), NULL); - sp_dialog_defocus_on_enter (sb); + sp_dialog_defocus_on_enter (sb); gtk_widget_show (sb); gtk_box_pack_start (GTK_BOX (dsel), sb, FALSE, FALSE, 0); gtk_signal_connect (dsel->offset, "value_changed", GTK_SIGNAL_FUNC (sp_dash_selector_offset_value_changed), dsel); @@ -264,7 +264,7 @@ sp_dash_selector_menu_item_new (SPDashSelector *dsel, double *pattern) // FIXME: all of the below twibblering is due to the limitations of gdk_gc_set_dashes (only integers, no zeroes). // Perhaps would make sense to rework this with manually drawn dashes. - + // Fill in the integer array of pixel-lengths, for display gint8 pixels_i[64]; gdouble pixels_d[64]; @@ -284,7 +284,7 @@ sp_dash_selector_menu_item_new (SPDashSelector *dsel, double *pattern) gdouble pixels = DASH_PREVIEW_WIDTH * pattern[i_s]; if (pixels > 0.0) - pixels_d [i_p] += pixels; + pixels_d [i_p] += pixels; else { if (i_p >= 1) { // dash is zero, skip this element in the array, and set pointer backwards so the next dash is added to the previous @@ -300,13 +300,13 @@ sp_dash_selector_menu_item_new (SPDashSelector *dsel, double *pattern) n_pixel_dashes = i_p; gdouble longest_dash = 0.0; - + // after summation, convert double dash lengths to ints for (i_p = 0; i_p < n_pixel_dashes; i_p ++) { pixels_i [i_p] = (gint8) (pixels_d [i_p] + 0.5); // zero-length dashes are already eliminated, so the <1 dash is short but not zero; // we approximate it with a one-pixel mark - if (pixels_i [i_p] < 1) + if (pixels_i [i_p] < 1) pixels_i [i_p] = 1; if (i_p % 2 == 0) { // it's a dash if (pixels_d [i_p] > longest_dash) @@ -329,21 +329,21 @@ sp_dash_selector_menu_item_new (SPDashSelector *dsel, double *pattern) } else if (all_odd_are_zero (pattern, n_source_dashes)) { // draw solid line, only dashes are non-zero gdk_gc_set_line_attributes (gc, DASH_PREVIEW_WIDTH, - GDK_LINE_SOLID, GDK_CAP_BUTT, + GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_MITER); gdk_draw_line (pixmap, gc, 4, 8, DASH_PREVIEW_LENGTH, 8); } else { // regular pattern with both gaps and dashes non-zero - gdk_gc_set_line_attributes (gc, DASH_PREVIEW_WIDTH, - GDK_LINE_ON_OFF_DASH, GDK_CAP_BUTT, + gdk_gc_set_line_attributes (gc, DASH_PREVIEW_WIDTH, + GDK_LINE_ON_OFF_DASH, GDK_CAP_BUTT, GDK_JOIN_MITER); gdk_gc_set_dashes (gc, 0, pixels_i, n_pixel_dashes); gdk_draw_line (pixmap, gc, 4, 8, DASH_PREVIEW_LENGTH, 8); } } else { // no pattern, draw solid line - gdk_gc_set_line_attributes (gc, DASH_PREVIEW_WIDTH, - GDK_LINE_SOLID, GDK_CAP_BUTT, + gdk_gc_set_line_attributes (gc, DASH_PREVIEW_WIDTH, + GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_MITER); gdk_draw_line (pixmap, gc, 4, 8, DASH_PREVIEW_LENGTH, 8); } @@ -351,9 +351,9 @@ sp_dash_selector_menu_item_new (SPDashSelector *dsel, double *pattern) gdk_gc_unref (gc); GtkWidget *px = gtk_pixmap_new (pixmap, NULL); - + gdk_pixmap_unref (pixmap); - + gtk_widget_show (px); gtk_container_add (GTK_CONTAINER (mi), px); diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp index 5f09d6704..3177700c3 100644 --- a/src/widgets/gradient-selector.cpp +++ b/src/widgets/gradient-selector.cpp @@ -250,7 +250,7 @@ sp_gradient_selector_set_vector (SPGradientSelector *sel, SPDocument *doc, SPGra g_return_if_fail (!vector || (SP_OBJECT_DOCUMENT (vector) == doc)); if (vector && !SP_GRADIENT_HAS_STOPS (vector)) - return; + return; sp_gradient_vector_selector_set_gradient (SP_GRADIENT_VECTOR_SELECTOR (sel->vectors), doc, vector); diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index 4aac04a3c..ccb36a3ec 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -482,7 +482,7 @@ select_stop_in_list( GtkWidget *mnu, SPGradient *gradient, SPStop *new_stop) if (SP_OBJECT (ochild) == SP_OBJECT(new_stop)) { gtk_option_menu_set_history (GTK_OPTION_MENU (mnu), i); break; - } + } i++; } } @@ -519,7 +519,7 @@ update_stop_list( GtkWidget *mnu, SPGradient *gradient, SPStop *new_stop) gtk_menu_append (GTK_MENU (m), i); gtk_widget_set_sensitive (mnu, FALSE); } else { - + for (; sl != NULL; sl = sl->next){ SPStop *stop; GtkWidget *i; @@ -596,7 +596,7 @@ sp_grad_edit_select (GtkOptionMenu *mnu, GtkWidget *tbl) SPStop *next = NULL; next = sp_next_stop(stop); - if (next != NULL ) { + if (next != NULL ) { adj->upper = next->offset; } else { isEndStop = true; @@ -663,7 +663,7 @@ sp_grd_ed_add_stop (GtkWidget *widget, GtkWidget *vb) SPStop *stop = (SPStop *) g_object_get_data (G_OBJECT(gtk_menu_get_active (GTK_MENU(gtk_option_menu_get_menu (mnu)))), "stop"); - if (stop == NULL) + if (stop == NULL) return; Inkscape::XML::Node *new_stop_repr = NULL; @@ -688,7 +688,7 @@ sp_grd_ed_add_stop (GtkWidget *widget, GtkWidget *vb) } SPStop *newstop = (SPStop *) SP_OBJECT_DOCUMENT(gradient)->getObjectByRepr(new_stop_repr); - + newstop->offset = (stop->offset + next->offset) * 0.5 ; guint32 const c1 = sp_stop_get_rgba32(stop); @@ -878,7 +878,7 @@ sp_gradient_vector_editor_new (SPGradient *gradient, SPStop *stop) w = prefs_get_int_attribute (prefs_path, "w", 0); h = prefs_get_int_attribute (prefs_path, "h", 0); } - if (x != 0 || y != 0) + if (x != 0 || y != 0) gtk_window_move ((GtkWindow *) dlg, x, y); else gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER); @@ -903,8 +903,8 @@ sp_gradient_vector_editor_new (SPGradient *gradient, SPStop *stop) gtk_container_add (GTK_CONTAINER (dlg), wid); } else { // FIXME: temp fix for 0.38 - // Simply load_gradient into the editor does not work for multi-stop gradients, - // as the stop list and other widgets are in a wrong state and crash readily. + // Simply load_gradient into the editor does not work for multi-stop gradients, + // as the stop list and other widgets are in a wrong state and crash readily. // Instead we just delete the window (by sending the delete signal) // and call sp_gradient_vector_editor_new again, so it creates the window anew. @@ -951,7 +951,7 @@ sp_gradient_vector_widget_load_gradient (GtkWidget *widget, SPGradient *gradient SPStop *stop = SP_STOP(g_object_get_data (G_OBJECT(gtk_menu_get_active (GTK_MENU(gtk_option_menu_get_menu (mnu)))), "stop")); guint32 const c = sp_stop_get_rgba32(stop); - /// get the color selector + /// get the color selector SPColorSelector *csel = SP_COLOR_SELECTOR(g_object_get_data (G_OBJECT (widget), "cselector")); // set alpha csel->base->setAlpha(SP_RGBA32_A_F (c)); diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp index 8b0935e8d..f16bc5852 100644 --- a/src/widgets/paint-selector.cpp +++ b/src/widgets/paint-selector.cpp @@ -298,7 +298,7 @@ sp_paint_selector_new (bool is_fill) // This silliness is here because I don't know how to pass a parameter to the // GtkObject "constructor" (sp_paint_selector_init). Remove it when paint_selector // becomes a normal class. - sp_paint_selector_show_fillrule (psel, is_fill); + sp_paint_selector_show_fillrule (psel, is_fill); return GTK_WIDGET (psel); } @@ -480,7 +480,7 @@ static void sp_paint_selector_clear_frame(SPPaintSelector *psel) { g_return_if_fail ( psel != NULL); - + if (psel->selector) { /* before we destroy the frame contents, we must detach @@ -939,7 +939,7 @@ sp_style_determine_paint_selector_mode (SPStyle *style, bool isfill) case SP_PAINT_TYPE_PAINTSERVER: { SPPaintServer *server = isfill? SP_STYLE_FILL_SERVER (style) : SP_STYLE_STROKE_SERVER (style); - + if (SP_IS_LINEARGRADIENT (server)) { return SP_PAINT_SELECTOR_MODE_GRADIENT_LINEAR; } else if (SP_IS_RADIALGRADIENT (server)) { diff --git a/src/widgets/sp-color-notebook.cpp b/src/widgets/sp-color-notebook.cpp index 9d92077da..c14d89f11 100644 --- a/src/widgets/sp-color-notebook.cpp +++ b/src/widgets/sp-color-notebook.cpp @@ -197,7 +197,7 @@ void ColorNotebook::init() SP_TYPE_COLOR_SCALES; SP_TYPE_COLOR_WHEEL_SELECTOR; - /* REJON: Comment out the next line to not use the normal GTK Color + /* REJON: Comment out the next line to not use the normal GTK Color wheel. */ // SP_TYPE_COLOR_GTKSELECTOR; @@ -245,7 +245,7 @@ void ColorNotebook::init() for ( i = 0; i < _trackerList->len; i++ ) { - SPColorNotebookTracker *entry = + SPColorNotebookTracker *entry = reinterpret_cast< SPColorNotebookTracker* > (g_ptr_array_index (_trackerList, i)); if ( entry ) { @@ -300,7 +300,7 @@ void ColorNotebook::init() gtk_widget_show (align); gtk_container_add (GTK_CONTAINER (align), _btn); - // uncomment to reenable the "show/hide modes" menu, + // uncomment to reenable the "show/hide modes" menu, // but first fix it so it remembers its settings in prefs and does not take that much space (entire vertical column!) //gtk_table_attach (GTK_TABLE (table), align, 2, 3, row, row + 1, GTK_FILL, GTK_FILL, XPAD, YPAD); diff --git a/src/widgets/spw-utilities.cpp b/src/widgets/spw-utilities.cpp index c3bcefa49..ecec84979 100644 --- a/src/widgets/spw-utilities.cpp +++ b/src/widgets/spw-utilities.cpp @@ -1,8 +1,8 @@ #define __SPW_UTILITIES_C__ -/* +/* * Inkscape Widget Utilities - * + * * Authors: * Bryce W. Harrington <brycehar@bryceharrington.com> * bulia byak <buliabyak@users.sf.net> @@ -23,8 +23,8 @@ #include "helper/unit-menu.h" -/** - * Creates a label widget with the given text, at the given col, row +/** + * Creates a label widget with the given text, at the given col, row * position in the table. */ GtkWidget * @@ -36,7 +36,7 @@ spw_label(GtkWidget * table, const gchar *label_text, int col, int row) g_assert(label_widget != NULL); gtk_misc_set_alignment (GTK_MISC (label_widget), 1.0, 0.5); gtk_widget_show (label_widget); - gtk_table_attach (GTK_TABLE (table), label_widget, col, col+1, row, row+1, + gtk_table_attach (GTK_TABLE (table), label_widget, col, col+1, row, row+1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)0, 4, 0); return label_widget; } @@ -53,7 +53,7 @@ spw_hbox(GtkWidget * table, int width, int col, int row) hb = gtk_hbox_new (FALSE, 4); g_assert(hb != NULL); gtk_widget_show (hb); - gtk_table_attach (GTK_TABLE (table), hb, col, col+width, row, row+1, + gtk_table_attach (GTK_TABLE (table), hb, col, col+width, row, row+1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)0, 0, 0); return hb; } @@ -132,7 +132,7 @@ spw_dropdown(GtkWidget * dialog, GtkWidget * table, spw_label(table, label_text, 0, row); gtk_widget_show (selector); - gtk_table_attach (GTK_TABLE (table), selector, 1, 2, row, row+1, + gtk_table_attach (GTK_TABLE (table), selector, 1, 2, row, row+1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)0, 0, 0); gtk_object_set_data (GTK_OBJECT (dialog), key, selector); return selector; @@ -140,7 +140,7 @@ spw_dropdown(GtkWidget * dialog, GtkWidget * table, /** * Creates a unit selector widget, used for selecting whether one wishes - * to measure screen elements in millimeters, points, etc. This is a + * to measure screen elements in millimeters, points, etc. This is a * compound unit that includes a label as well as the dropdown selector. */ GtkWidget * @@ -166,7 +166,7 @@ spw_unit_selector(GtkWidget * dialog, GtkWidget * table, sb = gtk_spin_button_new (GTK_ADJUSTMENT (a), 1.0, 4); g_assert(sb != NULL); gtk_widget_show (sb); - gtk_table_attach (GTK_TABLE (table), sb, 1, 2, row, row+1, + gtk_table_attach (GTK_TABLE (table), sb, 1, 2, row, row+1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)0, 0, 0); g_signal_connect (G_OBJECT (a), "value_changed", cb, dialog); return sb; @@ -216,7 +216,7 @@ sp_search_by_data_recursive (GtkWidget *w, gpointer key) r = gtk_object_get_data (GTK_OBJECT(w), (gchar *) key); } if (r) return r; - + if (GTK_IS_CONTAINER(w)) { GList *ch = gtk_container_get_children (GTK_CONTAINER(w)); for (GList *i = ch; i != NULL; i = i->next) { @@ -241,7 +241,7 @@ sp_search_by_value_recursive (GtkWidget *w, gchar *key, gchar *value) r = (gchar *) gtk_object_get_data (GTK_OBJECT(w), key); } if (r && !strcmp (r, value)) return w; - + if (GTK_IS_CONTAINER(w)) { GList *ch = gtk_container_get_children (GTK_CONTAINER(w)); for (GList *i = ch; i != NULL; i = i->next) { |
