Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix warning at execution

  • Loading branch information...
commit b3446bc6cd93e1e229b11825c7b90d00f6d6da36 1 parent 7175a16
@marc-lorber authored
View
20 src/sheet/node-item.c
@@ -1,19 +1,3 @@
-/* TODO:
-
-Hoppa över wires som inte connectar.
-
- -> Måste lagra connections dots i SheetNode.
- -> NodeItem
-
- -> Byt namn på SheetNode till Node.
-
- -> Inte kunna selecta (etc) NodeItem.
-
- -> Inte autoconnect på wires som korsas.
- -> Möjlighet att connecta två wires som korsas.
-
-*/
-
/*
* node-item.c
* Authors:
@@ -125,6 +109,4 @@ node_item_show_dot (NodeItem *item, gboolean show)
if (item->priv->dot_item != NULL)
gnome_canvas_item_hide (item->priv->dot_item);
}
-}
-
-
+}
View
107 src/sheet/part-item.c
@@ -101,21 +101,21 @@ enum {
};
struct _PartItemPriv {
- guint cache_valid : 1;
- guint highlight : 1;
+ guint cache_valid : 1;
+ guint highlight : 1;
GnomeCanvasGroup *label_group;
- GSList *label_items;
+ GSList *label_items;
GnomeCanvasGroup *node_group;
- GSList *label_nodes;
+ GSList *label_nodes;
/*
* Cached bounding box. This is used to make
* the rubberband selection a bit faster.
*/
- SheetPos bbox_start;
- SheetPos bbox_end;
+ SheetPos bbox_start;
+ SheetPos bbox_end;
};
typedef struct {
@@ -123,7 +123,7 @@ typedef struct {
PartItem *part_item;
/* List of GtkEntry's */
- GList *widgets;
+ GList *widgets;
} PartPropDialog;
static PartPropDialog *prop_dialog = NULL;
@@ -135,6 +135,9 @@ static const char *part_item_context_menu =
" <menuitem action='ObjectProperties'/>"
" </popup>"
"</ui>";
+static GtkActionEntry action_entries[] = {
+ {"ObjectProperties", GTK_STOCK_PROPERTIES, N_("_Object Properties..."), NULL, N_("Modify the object's properties"), NULL}//G_CALLBACK (object_properties_cmd)}
+};
enum {
ANCHOR_NORTH,
@@ -181,8 +184,6 @@ GtkAnchorType part_item_get_anchor_from_part (Part *part)
return GTK_ANCHOR_NORTH_WEST;
if ((anchor_v == ANCHOR_WEST) && (anchor_h == ANCHOR_SOUTH))
return GTK_ANCHOR_SOUTH_WEST;
- if ((anchor_v == ANCHOR_EAST) && (anchor_h == ANCHOR_SOUTH))
- return GTK_ANCHOR_SOUTH_EAST;
return GTK_ANCHOR_SOUTH_EAST;
}
@@ -269,9 +270,6 @@ part_item_class_init (PartItemClass *part_item_class)
"model",
G_PARAM_READABLE | G_PARAM_WRITABLE));
-// object_class->dispose = part_item_dispose;
-// object_class->finalize = item_data_finalize;
-
gtk_object_class->destroy = part_item_destroy;
sheet_item_class->moved = part_item_moved;
@@ -297,7 +295,8 @@ part_item_init (PartItem *item)
item->priv = priv;
- sheet_item_add_menu (SHEET_ITEM (item), part_item_context_menu);
+ sheet_item_add_menu (SHEET_ITEM (item), part_item_context_menu,
+ action_entries, G_N_ELEMENTS (action_entries));
}
static void
@@ -312,12 +311,6 @@ part_item_set_property (GObject *object, guint propety_id, const GValue *value,
part_item = PART_ITEM(object);
priv = part_item->priv;
-
- switch (propety_id) {
- default:
- g_warning ("PartItem: Invalid argument.\n");
-
- }
}
static void
@@ -332,12 +325,6 @@ part_item_get_property (GObject *object, guint propety_id, GValue *value,
part_item = PART_ITEM (object);
priv = part_item->priv;
-
- switch (propety_id) {
- default:
- pspec->value_type = G_TYPE_INVALID;
- break;
- }
}
static void
@@ -480,7 +467,7 @@ update_canvas_labels (PartItem *item)
label_items = priv->label_items;
- /* Pone las etiquetas de Item */
+ /* Put the label of each item */
for (labels = part_get_labels (part); labels;
labels = labels->next, label_items = label_items->next) {
char *text;
@@ -512,7 +499,7 @@ part_item_update_node_label (PartItem *item)
g_return_if_fail( IS_PART(part) );
- /* Pone las etiquetas de los nodos */
+ /* Put the label of each node */
num_pins = part_get_num_pins(part);
pins = part_get_pins(part);
labels = priv->label_nodes;
@@ -559,7 +546,7 @@ prop_dialog_response(GtkWidget *dialog, gint response,
widget = widget->next) {
w = widget->data;
- prop_name = gtk_object_get_user_data (GTK_OBJECT (w));
+ prop_name = g_object_get_data (G_OBJECT (w), "user");
prop_value = gtk_entry_get_text (GTK_ENTRY (w));
for (props = part_get_properties (part); props; props = props->next) {
@@ -576,7 +563,7 @@ prop_dialog_response(GtkWidget *dialog, gint response,
}
static void
-edit_properties_punta (PartItem *item)
+edit_properties_point (PartItem *item)
{
GSList *properties;
PartItemPriv *priv;
@@ -592,17 +579,17 @@ edit_properties_punta (PartItem *item)
part = PART (sheet_item_get_data (SHEET_ITEM (item)));
if (!g_file_test(
- OREGANO_GLADEDIR "/clamp-properties-dialog.glade2",
+ OREGANO_GLADEDIR "/clamp-properties-dialog.glade",
G_FILE_TEST_EXISTS)) {
msg = g_strdup_printf (
_("The file %s could not be found. You might need to reinstall Oregano to fix this."),
- OREGANO_GLADEDIR "/clamp-properties-dialog.glade2");
+ OREGANO_GLADEDIR "/clamp-properties-dialog.glade");
oregano_error_with_title (_("Could not create part properties dialog."), msg);
g_free (msg);
return;
}
- gui = glade_xml_new (OREGANO_GLADEDIR "/clamp-properties-dialog.glade2",
+ gui = glade_xml_new (OREGANO_GLADEDIR "/clamp-properties-dialog.glade",
NULL, NULL);
if (!gui) {
oregano_error (_("Could not create part properties dialog."));
@@ -619,7 +606,7 @@ edit_properties_punta (PartItem *item)
radio_v = GTK_RADIO_BUTTON (glade_xml_get_widget (gui, "radio_v"));
radio_c = GTK_RADIO_BUTTON (glade_xml_get_widget (gui, "radio_c"));
- /* FIXME : Desactivada mientras se trabaja en el backend */
+ /* FIXME: Deactivated up to finalisation of the analysis by the backend */
gtk_widget_set_sensitive (GTK_WIDGET (radio_c), FALSE);
ac_r = GTK_RADIO_BUTTON (glade_xml_get_widget (gui, "radio_r"));
@@ -733,8 +720,8 @@ edit_properties (SheetItem *object)
return;
}
/* Hack!! */
- if (g_strcasecmp (internal, "punta") == 0) {
- edit_properties_punta (item);
+ if (g_strcasecmp (internal, "point") == 0) {
+ edit_properties_point (item);
return;
}
}
@@ -742,17 +729,17 @@ edit_properties (SheetItem *object)
g_free (internal);
if (!g_file_test(
- OREGANO_GLADEDIR "/part-properties-dialog.glade2",
+ OREGANO_GLADEDIR "/part-properties-dialog.glade",
G_FILE_TEST_EXISTS)) {
msg = g_strdup_printf (
_("The file %s could not be found. You might need to reinstall Oregano to fix this."),
- OREGANO_GLADEDIR "/part-properties-dialog.glade2");
+ OREGANO_GLADEDIR "/part-properties-dialog.glade");
oregano_error_with_title (_("Could not create part properties dialog."), msg);
g_free (msg);
return;
}
- gui = glade_xml_new (OREGANO_GLADEDIR "/part-properties-dialog.glade2",
+ gui = glade_xml_new (OREGANO_GLADEDIR "/part-properties-dialog.glade",
NULL, NULL);
if (!gui) {
oregano_error (_("Could not create part properties dialog."));
@@ -769,19 +756,20 @@ edit_properties (SheetItem *object)
notebook = GTK_NOTEBOOK (glade_xml_get_widget (gui, "notebook"));
g_signal_connect (prop_dialog->dialog, "destroy",
- (GCallback) prop_dialog_destroy,
- prop_dialog
- );
+ (GCallback) prop_dialog_destroy, prop_dialog);
prop_dialog->widgets = NULL;
has_model = FALSE;
for (properties = part_get_properties (part); properties;
properties = properties->next) {
Property *prop;
+
prop = properties->data;
if (prop->name) {
GtkWidget *entry;
GtkWidget *label;
+ gchar *temp=NULL;
+
if (!g_strcasecmp (prop->name, "internal"))
continue;
@@ -790,25 +778,33 @@ edit_properties (SheetItem *object)
model_name = g_strdup (prop->value);
}
- label = gtk_label_new (prop->name);
+
+ /* Find the Refdes and replace by their real value */
+ temp = prop->name;
+ if (!g_ascii_strcasecmp (temp, "Refdes")) temp = _("Designation");
+ if (!g_ascii_strcasecmp (temp, "Template")) temp = _("Template");
+ if (!g_ascii_strcasecmp (temp, "Res")) temp = _("Resistor");
+ if (!g_ascii_strcasecmp (temp, "Cap")) temp = _("Capacitor");
+ if (!g_ascii_strcasecmp (temp, "Ind")) temp = _("Inductor");
+ label = gtk_label_new (temp);
entry = gtk_entry_new ();
- gtk_entry_set_text (GTK_ENTRY (entry), prop->value);
- gtk_object_set_user_data (GTK_OBJECT (entry), g_strdup (prop->name));
+ gtk_entry_set_text (GTK_ENTRY (entry), prop->value);
+ g_object_set_data (G_OBJECT (entry), "user", g_strdup (prop->name));
gtk_table_attach (
prop_table, label,
0, 1, y, y+1,
GTK_FILL|GTK_SHRINK,
GTK_FILL|GTK_SHRINK,
- 8, 8
- );
+ 8, 8);
+
gtk_table_attach (
prop_table, entry,
1, 2, y, y+1,
GTK_EXPAND|GTK_FILL,
GTK_FILL|GTK_SHRINK,
- 8, 8
- );
+ 8, 8);
+
y++;
gtk_widget_show (label);
gtk_widget_show (entry);
@@ -1024,21 +1020,6 @@ part_flipped_callback (ItemData *data, gboolean horizontal,
anchor = part_item_get_anchor_from_part (part);
- /*if (horizontal) {
- if (flip & ID_FLIP_HORIZ)
- anchor = GTK_ANCHOR_SOUTH_EAST;
- else
- anchor = GTK_ANCHOR_SOUTH_WEST;
- } else {
- if (flip & ID_FLIP_VERT)
- anchor = GTK_ANCHOR_NORTH_WEST;
- else
- anchor = GTK_ANCHOR_NORTH_EAST;
- }
- if ((flip & ID_FLIP_HORIZ) && (flip & ID_FLIP_VERT)) {
- anchor = GTK_ANCHOR_NORTH_EAST;
- }*/
-
for (label = item->priv->label_items; label; label = label->next) {
gnome_canvas_item_set (
GNOME_CANVAS_ITEM (label->data),
View
6 src/sheet/part-item.h
@@ -61,10 +61,10 @@ PartItem *part_item_new (Sheet *sheet, Part *part);
PartItem *part_item_new_from_part (Sheet *sheet, Part *part);
void part_item_signal_connect_floating (PartItem *item);
void part_item_signal_connect_floating_group (Sheet *sheet,
- SchematicView *schematic_view);
+ SchematicView *schematic_view);
void part_item_create_canvas_items_for_preview (GnomeCanvasGroup *group,
- LibraryPart *library_part);
+ LibraryPart *library_part);
void part_item_update_node_label (PartItem *part);
-void part_item_show_node_labels (PartItem *part, gboolean b);
+void part_item_show_node_labels (PartItem *part, gboolean b);
#endif
View
43 src/sheet/sheet-item.c
@@ -35,20 +35,22 @@
#include "stock.h"
#include "schematic.h"
#include "schematic-view.h"
+#include "config.h"
static void sheet_item_class_init (SheetItemClass * klass);
static void sheet_item_init (SheetItem *item);
static void sheet_item_set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *spec);
+ const GValue *value, GParamSpec *spec);
static void sheet_item_get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *spec);
+ GValue *value, GParamSpec *spec);
static void sheet_item_destroy (GtkObject *object);
-static void sheet_item_run_menu (SheetItem *item, SchematicView *sv, GdkEventButton *event);
+static void sheet_item_run_menu (SheetItem *item, SchematicView *sv,
+ GdkEventButton *event);
static GnomeCanvasGroupClass *sheet_item_parent_class = NULL;
extern GObject *clipboard_data_get_item_data ();
@@ -98,6 +100,14 @@ static const char *sheet_item_context_menu =
" </popup>"
"</ui>";
+static GtkActionEntry action_entries[] = {
+ {"Copy", GTK_STOCK_COPY, N_("_Copy"), "<control>C", NULL, NULL},
+ {"Cut", GTK_STOCK_CUT, N_("C_ut"), "<control>X", NULL, NULL},
+ {"Delete", GTK_STOCK_DELETE, N_("_Delete"), "<control>D", N_("Delete the selection"), NULL},
+ {"Rotate", STOCK_PIXMAP_ROTATE, N_("_Rotate"), "<control>R", N_("Rotate the selection clockwise"), NULL},
+ {"FlipH", NULL, N_("Flip _horizontally"), "<control>F", N_("Flip the selection horizontally"), NULL},
+ {"FlipV", NULL, N_("Flip _vertically"), "<control><shift>F", N_("Flip the selection vertically"), NULL}
+};
GType
sheet_item_get_type ()
{
@@ -220,6 +230,14 @@ sheet_item_init (SheetItem *item)
item->priv->action_group = NULL;
item->priv->ui_manager = gtk_ui_manager_new ();
+ item->priv->action_group = gtk_action_group_new ("action_group");
+ gtk_action_group_set_translation_domain (item->priv->action_group, GETTEXT_PACKAGE);
+ gtk_action_group_add_actions (item->priv->action_group,
+ action_entries,
+ G_N_ELEMENTS (action_entries),
+ NULL);
+ gtk_ui_manager_insert_action_group (item->priv->ui_manager, item->priv->action_group, 0);
+
if (!gtk_ui_manager_add_ui_from_string (item->priv->ui_manager, sheet_item_context_menu, -1, &error)) {
g_message ("building menus failed: %s", error->message);
g_error_free (error);
@@ -313,7 +331,7 @@ sheet_item_run_menu (SheetItem *item, SchematicView *sv, GdkEventButton *event)
}
static int
-scroll_timeout_cb (Sheet *sheet)
+scroll_timeout_callback (Sheet *sheet)
{
int width, height;
int x, y, dx = 0, dy = 0;
@@ -412,7 +430,7 @@ sheet_item_event (SheetItem *sheet_item, const GdkEvent *event, SchematicView *s
!((event->button.state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK))
schematic_view_select_all (sv, FALSE);
-// if (!sheet_item->priv->selected)
+ //if (!sheet_item->priv->selected)
sheet_item_select (sheet_item, TRUE);
class = SHEET_ITEM_CLASS (GTK_OBJECT_GET_CLASS(sheet_item));
@@ -472,7 +490,7 @@ sheet_item_event (SheetItem *sheet_item, const GdkEvent *event, SchematicView *s
"y", &delta.y,
NULL);
- gtk_timeout_remove (priv->scroll_timeout_id); // Esto no esta bien.
+ gtk_timeout_remove (priv->scroll_timeout_id); // Tricky...
sheet->state = SHEET_STATE_NONE;
gnome_canvas_item_ungrab (GNOME_CANVAS_ITEM (sheet_item), event->button.time);
@@ -602,7 +620,7 @@ sheet_item_event (SheetItem *sheet_item, const GdkEvent *event, SchematicView *s
* Start the autoscroll timeout.
*/
priv->scroll_timeout_id =
- g_timeout_add (50, (void *) scroll_timeout_cb, sheet);
+ g_timeout_add (50, (void *) scroll_timeout_callback, sheet);
}
snapped_x = event->motion.x;
@@ -723,7 +741,6 @@ sheet_item_floating_event (Sheet *sheet, const GdkEvent *event, SchematicView *s
GList *list;
static SheetPos delta, tmp;
static int control_key_down = 0;
-// GtkArg arg[2];
/* Remember the last position of the mouse cursor. */
static double last_x, last_y;
@@ -1188,10 +1205,16 @@ sheet_item_place_ghost (SheetItem *item, SchematicView *sv)
}
void
-sheet_item_add_menu (SheetItem *item, const char *menu)
+sheet_item_add_menu (SheetItem *item, const char *menu,
+ const GtkActionEntry *action_entries, int nb_entries)
{
GError *error = NULL;
- if (!gtk_ui_manager_add_ui_from_string (item->priv->ui_manager, menu, -1, &error)) {
+ gtk_action_group_add_actions (item->priv->action_group,
+ action_entries,
+ nb_entries,
+ NULL);
+
+ if (!gtk_ui_manager_add_ui_from_string (item->priv->ui_manager, menu, -1, &error)) {
g_message ("building menus failed: %s", error->message);
g_error_free (error);
exit (EXIT_FAILURE);
View
3  src/sheet/sheet-item.h
@@ -123,6 +123,7 @@ void sheet_item_select_in_area (SheetItem *item,
void sheet_item_place (SheetItem *item, SchematicView *sv);
void sheet_item_place_ghost (SheetItem *item, SchematicView *sv);
-void sheet_item_add_menu (SheetItem *item, const char *menu);
+void sheet_item_add_menu (SheetItem *item, const char *menu,
+ const GtkActionEntry *action_entries, int nb_entries);
#endif
View
24 src/sheet/sheet.h
@@ -74,19 +74,19 @@ struct _SheetClass {
void (*reset_tool) (Sheet *sheet);
};
-GType sheet_get_type (void);
+GType sheet_get_type (void);
GtkWidget *sheet_new (int width, int height);
-void sheet_scroll (const Sheet *sheet, int dx, int dy);
-void sheet_get_size_pixels (const Sheet *sheet, guint *width, guint *height);
-int sheet_get_num_selected_items (const Sheet *sheet);
+void sheet_scroll (const Sheet *sheet, int dx, int dy);
+void sheet_get_size_pixels (const Sheet *sheet, guint *width, guint *height);
+int sheet_get_num_selected_items (const Sheet *sheet);
gpointer sheet_get_first_selected_item (const Sheet *sheet);
-GSList *sheet_get_selected_items (const Sheet *sheet);
-void sheet_change_zoom (const Sheet *sheet, double rate);
-void sheet_get_zoom (const Sheet *sheet, gdouble *zoom);
-void sheet_dialog_set_parent (const Sheet *sheet, GtkDialog *dialog);
-void sheet_delete_selected_items (const Sheet *sheet);
-void sheet_rotate_selected_items (const Sheet *sheet);
-void sheet_rotate_floating_items (const Sheet *sheet);
-void sheet_reset_floating_items (const Sheet *sheet);
+GSList *sheet_get_selected_items (const Sheet *sheet);
+void sheet_change_zoom (const Sheet *sheet, double rate);
+void sheet_get_zoom (const Sheet *sheet, gdouble *zoom);
+void sheet_dialog_set_parent (const Sheet *sheet, GtkDialog *dialog);
+void sheet_delete_selected_items (const Sheet *sheet);
+void sheet_rotate_selected_items (const Sheet *sheet);
+void sheet_rotate_floating_items (const Sheet *sheet);
+void sheet_reset_floating_items (const Sheet *sheet);
#endif
View
67 src/sheet/textbox-item.c
@@ -48,13 +48,10 @@
#define NORMAL_COLOR "black"
#define SELECTED_COLOR "green"
-//#define TEXTBOX_FONT "-*-helvetica-medium-r-*-*-*-100-*-*-*-*-*-*"
#define TEXTBOX_FONT "Arial 10"
static void textbox_item_class_init (TextboxItemClass *klass);
static void textbox_item_init (TextboxItem *item);
-static void textbox_item_set_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void textbox_item_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
static void textbox_item_destroy (GtkObject *object);
static void textbox_item_moved (SheetItem *object);
@@ -101,6 +98,11 @@ static const char *textbox_item_context_menu =
" </popup>"
"</ui>";
+static GtkActionEntry action_entries[] = {
+ {"EditText", GTK_STOCK_PROPERTIES, N_("_Edit the text..."), NULL,
+ N_("Edit the text"),G_CALLBACK (edit_cmd)}
+};
+
enum {
TEXTBOX_ITEM_ARG_0,
TEXTBOX_ITEM_ARG_NAME
@@ -159,11 +161,7 @@ textbox_item_class_init (TextboxItemClass *textbox_item_class)
sheet_item_class = SHEET_ITEM_CLASS(textbox_item_class);
textbox_item_parent_class =
g_type_class_peek_parent(textbox_item_class);
-/* gtk_object_add_arg_type ("TextboxItem::name",
- * GTK_TYPE_POINTER, GTK_ARG_READWRITE, TEXTBOX_ITEM_ARG_NAME);
- object_class->set_arg = textbox_item_set_arg;
- object_class->get_arg = textbox_item_get_arg;*/
gtk_object_class->destroy = textbox_item_destroy;
sheet_item_class->moved = textbox_item_moved;
@@ -186,39 +184,11 @@ textbox_item_init (TextboxItem *item)
priv->highlight = FALSE;
priv->cache_valid = FALSE;
- sheet_item_add_menu (SHEET_ITEM (item), textbox_item_context_menu);
-}
-
-/*static void
-textbox_item_set_arg (GObject *object, GtkArg *arg, guint arg_id)
-{
- TextboxItem *textbox_item = TEXTBOX_ITEM (object);
-
- textbox_item = TEXTBOX_ITEM (object);
-
- switch (arg_id) {
- case TEXTBOX_ITEM_ARG_NAME:
- break;
- }
+ sheet_item_add_menu (SHEET_ITEM (item), textbox_item_context_menu,
+ action_entries, G_N_ELEMENTS (action_entries));
}
static void
-textbox_item_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- TextboxItem *textbox_item = TEXTBOX_ITEM (object);
-
- textbox_item = TEXTBOX_ITEM (object);
-
- switch (arg_id) {
- case TEXTBOX_ITEM_ARG_NAME:
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}*/
-
-static void
textbox_item_destroy (GtkObject *object)
{
TextboxItem *textbox;
@@ -358,16 +328,12 @@ select_idle_callback (TextboxItem *item)
SheetPos bbox_start, bbox_end;
TextboxItemPriv *priv = item->priv;
- // if (GTK_OBJECT_DESTROYED (item))
- // return FALSE;
-
get_cached_bounds (item, &bbox_start, &bbox_end);
gnome_canvas_item_set (GNOME_CANVAS_ITEM (priv->text_canvas_item),
"fill_color", SELECTED_COLOR, NULL);
priv->highlight = TRUE;
- // g_object_unref(G_OBJECT(item));
return FALSE;
}
@@ -381,14 +347,12 @@ deselect_idle_callback (TextboxItem *item)
priv->highlight = FALSE;
- //g_object_unref(G_OBJECT(item));
return FALSE;
}
static void
selection_changed (TextboxItem *item, gboolean select, gpointer user_data)
{
- // g_object_ref(G_OBJECT(item));
if (select)
gtk_idle_add ((gpointer) select_idle_callback, item);
else
@@ -436,21 +400,14 @@ get_cached_bounds (TextboxItem *item, SheetPos *p1, SheetPos *p2)
SheetPos start_pos, end_pos;
font = pango_font_description_from_string(TEXTBOX_FONT);
- //gdk_string_extents (font,
- // textbox_get_text (TEXTBOX (sheet_item_get_data (SHEET_ITEM (item)))),
- // &lbearing,
- // &rbearing,
- // &width,
- // &ascent,
- // &descent);
item_data_get_pos (sheet_item_get_data (SHEET_ITEM (item)),
&pos);
start_pos.x = pos.x;
start_pos.y = pos.y-5;// - font->ascent;
- end_pos.x = pos.x+5; // + rbearing;
- end_pos.y = pos.y+5;// + font->descent;
+ end_pos.x = pos.x+5; // + rbearing;
+ end_pos.y = pos.y+5; // + font->descent;
priv->bbox_start = start_pos;
priv->bbox_end = end_pos;
@@ -684,18 +641,18 @@ edit_textbox (SheetItem *sheet_item)
priv = item->priv;
textbox = TEXTBOX (sheet_item_get_data (sheet_item));
- if (!g_file_test (OREGANO_GLADEDIR "/textbox-properties-dialog.glade2",
+ if (!g_file_test (OREGANO_GLADEDIR "/textbox-properties-dialog.glade",
G_FILE_TEST_EXISTS)) {
msg = g_strdup_printf (
_("The file %s could not be found. You might need to reinstall Oregano to fix this."),
- OREGANO_GLADEDIR "/textbox-properties-dialog.glade2");
+ OREGANO_GLADEDIR "/textbox-properties-dialog.glade");
oregano_error (_("Could not create textbox properties dialog"));
g_free (msg);
return;
}
gui = glade_xml_new (
- OREGANO_GLADEDIR "/textbox-properties-dialog.glade2",
+ OREGANO_GLADEDIR "/textbox-properties-dialog.glade",
NULL, NULL);
if (!gui) {
oregano_error (_("Could not create textbox properties dialog"));
Please sign in to comment.
Something went wrong with that request. Please try again.