VnMod, VnForm

- Se ha arreglado un problema con los menús
This commit is contained in:
Alejandro T. Colombini Gómez 2014-10-10 12:33:36 +02:00
parent ea4aea818b
commit 6192dfb0db
4 changed files with 11 additions and 11 deletions

View File

@ -338,8 +338,9 @@ gboolean db_iterator_move_last (DbIterator * self)
* db_iterator_move_previous:
* @self: a #DbIterator
*
* Moves the iterator cursor to the previous row, or displays a message if no
* exists. If no selected row, attempts to move the cursor to the first row.
* Moves the iterator cursor to the previous row, or displays a message if it
* doesn't exists. If there's no selected row, attempts to move the cursor to
* the last row.
*
* Return value: #TRUE if the iter was succesfully moved, #FALSE otherwise
**/
@ -364,7 +365,7 @@ gboolean db_iterator_move_previous (DbIterator * self)
db_iter_free (iter);
}
else
move = db_iterator_move_first (self);
move = db_iterator_move_last (self);
return move;
}
@ -373,8 +374,9 @@ gboolean db_iterator_move_previous (DbIterator * self)
* db_iterator_move_next:
* @self: a #DbIterator
*
* Moves the iterator cursor to the next row, or displays a message if no exists.
* If no selected row, attempts to move the cursor to the first row.
* Moves the iterator cursor to the next row, or displays a message if it
* doesn't exists. If there's no selected row, attempts to move the cursor to
* the first row.
*
* Return value: #TRUE if the iter was succesfully moved, #FALSE otherwise
**/
@ -399,7 +401,7 @@ gboolean db_iterator_move_next (DbIterator * self)
db_iter_free (iter);
}
else
move = db_iterator_move_last (self);
move = db_iterator_move_first (self);
return move;
}

View File

@ -213,9 +213,8 @@ static void vn_form_finalize (VnForm * obj)
{
g_free (obj->name);
g_clear_object (&obj->gui);
g_clear_object (&obj->builder);
g_clear_object (&obj->mod);
g_clear_object (&obj->menu);
g_clear_object (&obj->builder);
G_OBJECT_CLASS (vn_form_parent_class)->finalize (G_OBJECT (obj));
}

View File

@ -611,12 +611,11 @@ static void vn_grid_finalize (VnGrid * self)
static void vn_grid_class_init (VnGridClass * klass)
{
GObjectClass * k = G_OBJECT_CLASS (klass);
k->finalize = (GObjectFinalizeFunc) vn_grid_finalize;
k->set_property = (GObjectSetPropertyFunc) vn_grid_set_property;
k->get_property = (GObjectGetPropertyFunc) vn_grid_get_property;
k->finalize = (GObjectFinalizeFunc) vn_grid_finalize;
g_object_class_override_property (k, PROP_MODEL, "data-model");
g_object_class_override_property (k, PROP_MODE, "mode");
g_object_class_override_property (k, PROP_REMEMBER_SELECTION, "remember-selection");
}

View File

@ -95,7 +95,7 @@ GMenuModel * vn_mod_get_menu_model (VnMod * obj)
builder = gtk_builder_new ();
if (gtk_builder_add_from_file (builder, menu_file, &err))
menu = G_MENU_MODEL (gtk_builder_get_object (builder, "menu"));
menu = g_object_ref (G_MENU_MODEL (gtk_builder_get_object (builder, "menu")));
else if (err)
{
if (err->code != G_FILE_ERROR_NOENT)