[glade3] * gladeui/glade-editor-property.[ch]: - Fixed an assertion and page-size != 0 for adjustment pro
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade3] * gladeui/glade-editor-property.[ch]: - Fixed an assertion and page-size != 0 for adjustment pro
- Date: Mon, 29 Mar 2010 20:32:21 +0000 (UTC)
commit 5916da88b5d993975ddcb05d3ff78fccda108c39
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Mon Mar 29 16:32:07 2010 -0400
* gladeui/glade-editor-property.[ch]:
- Fixed an assertion and page-size != 0 for adjustment properties in libglade mode
* gladeui/glade-signal-editor.c:
- Dont show swapped column in libglade mode
ChangeLog | 2 ++
gladeui/glade-editor-property.c | 15 +++++++--------
gladeui/glade-signal-editor.c | 8 ++++++++
gladeui/glade-signal-editor.h | 2 +-
4 files changed, 18 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 08cbe5a..b53b4c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,12 +3,14 @@
* gladeui/glade-editor-property.[ch]:
- Added glade_editor_property_show_object_dialog()
- Give object dialogs a bigger default size and hide the column headers
+ - Fixed an assertion and page-size != 0 for adjustment properties in libglade mode
* gladeui/glade-signal-editor.c:
- Use glade_editor_property_show_object_dialog() to select project objects for signal user data.
- Added tooltips for the column headers
- Now show an icon and tooltip in rows for signals that are only
supported in the future, refresh them when support changes.
+ - Dont show swapped column in libglade mode
* gladeui/glade-widget-adaptor.h, gladeui/glade-property-class.h: Added some version checking macros.
diff --git a/gladeui/glade-editor-property.c b/gladeui/glade-editor-property.c
index d9045af..a74e8f2 100644
--- a/gladeui/glade-editor-property.c
+++ b/gladeui/glade-editor-property.c
@@ -3421,16 +3421,15 @@ glade_eprop_adjustment_load (GladeEditorProperty *eprop, GladeProperty *property
object = g_value_get_object (property->value);
if (object)
+ {
adj = GTK_ADJUSTMENT (object);
- /* Keep track of external adjustment changes */
- g_signal_connect (object, "value-changed",
- G_CALLBACK (glade_eprop_adj_value_changed),
- eprop);
+ /* Keep track of external adjustment changes */
+ g_signal_connect (object, "value-changed",
+ G_CALLBACK (glade_eprop_adj_value_changed),
+ eprop);
- /* Update adjustment's values */
- if (adj)
- {
+ /* Update adjustment's values */
gtk_adjustment_set_value (eprop_adj->value_adj, gtk_adjustment_get_value (adj));
gtk_adjustment_set_lower (eprop_adj->value_adj, gtk_adjustment_get_lower (adj));
gtk_adjustment_set_upper (eprop_adj->value_adj, gtk_adjustment_get_upper (adj));
@@ -3445,7 +3444,7 @@ glade_eprop_adjustment_load (GladeEditorProperty *eprop, GladeProperty *property
gtk_adjustment_set_upper (eprop_adj->value_adj, 100.0);
gtk_adjustment_set_step_increment (eprop_adj->value_adj, 1);
gtk_adjustment_set_page_increment (eprop_adj->value_adj, 10);
- gtk_adjustment_set_page_size (eprop_adj->value_adj, 10);
+ gtk_adjustment_set_page_size (eprop_adj->value_adj, 0);
}
/* Block Handlers */
diff --git a/gladeui/glade-signal-editor.c b/gladeui/glade-signal-editor.c
index 2a18473..c9d5952 100644
--- a/gladeui/glade-signal-editor.c
+++ b/gladeui/glade-signal-editor.c
@@ -947,6 +947,9 @@ glade_signal_editor_construct_signals_list (GladeSignalEditor *editor)
gtk_tree_view_append_column (view, column);
+ /* - No need for a ref here - */
+ editor->swapped_column_ptr = column;
+
/************************ after column ************************/
renderer = gtk_cell_renderer_toggle_new ();
@@ -1124,6 +1127,11 @@ glade_signal_editor_load_widget (GladeSignalEditor *editor,
if (!widget)
return;
+ if (glade_project_get_format (glade_widget_get_project (widget)) == GLADE_PROJECT_FORMAT_GTKBUILDER)
+ gtk_tree_view_column_set_visible (editor->swapped_column_ptr, TRUE);
+ else
+ gtk_tree_view_column_set_visible (editor->swapped_column_ptr, FALSE);
+
/* Loop over every signal type
*/
for (list = editor->adaptor->signals; list; list = list->next)
diff --git a/gladeui/glade-signal-editor.h b/gladeui/glade-signal-editor.h
index 865da17..17cd2d9 100644
--- a/gladeui/glade-signal-editor.h
+++ b/gladeui/glade-signal-editor.h
@@ -60,7 +60,7 @@ struct _GladeSignalEditor
GtkTreeModel *handler_store, *userdata_store;
GtkCellRenderer *handler_renderer, *userdata_renderer;
- GtkTreeViewColumn *handler_column, *userdata_column;
+ GtkTreeViewColumn *handler_column, *userdata_column, *swapped_column_ptr;
IsVoidFunc is_void_handler, is_void_userdata;
gulong refresh_id;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]