summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--ChangeLog.pre-2-013
-rw-r--r--ChangeLog.pre-2-1013
-rw-r--r--ChangeLog.pre-2-213
-rw-r--r--ChangeLog.pre-2-413
-rw-r--r--ChangeLog.pre-2-613
-rw-r--r--ChangeLog.pre-2-813
-rw-r--r--gtk/gtkcombo.c32
-rw-r--r--gtk/gtkhbox.c2
-rw-r--r--gtk/gtkhbox.h2
-rw-r--r--gtk/gtktogglebutton.c12
-rw-r--r--gtk/gtktogglebutton.h1
-rw-r--r--gtk/gtkvbox.c2
-rw-r--r--gtk/gtkvbox.h2
14 files changed, 129 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 63d8f8766..48d68cf5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+1999-01-20 Jeff Garzik <jgarzik@pobox.com>
+
+ * gtk/gtkcombo.c (gtk_combo_entry_key_press):
+ Free 'nprefix', closing a memory leak.
+ Spaced out the code a bit to make it more readable.
+
+ * gtk/gtkhbox.[ch] (gtk_hbox_new),
+ gtk/gtkvbox.[ch] (gtk_vbox_new):
+ Change 'homogenous' arg from gint to gboolean.
+
+ * gtk/gtktogglebutton.[ch]:
+ New function gtk_toggle_button_get_active().
+
1999-01-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Allow button 2 to act
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 63d8f8766..48d68cf5e 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,16 @@
+1999-01-20 Jeff Garzik <jgarzik@pobox.com>
+
+ * gtk/gtkcombo.c (gtk_combo_entry_key_press):
+ Free 'nprefix', closing a memory leak.
+ Spaced out the code a bit to make it more readable.
+
+ * gtk/gtkhbox.[ch] (gtk_hbox_new),
+ gtk/gtkvbox.[ch] (gtk_vbox_new):
+ Change 'homogenous' arg from gint to gboolean.
+
+ * gtk/gtktogglebutton.[ch]:
+ New function gtk_toggle_button_get_active().
+
1999-01-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Allow button 2 to act
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 63d8f8766..48d68cf5e 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,16 @@
+1999-01-20 Jeff Garzik <jgarzik@pobox.com>
+
+ * gtk/gtkcombo.c (gtk_combo_entry_key_press):
+ Free 'nprefix', closing a memory leak.
+ Spaced out the code a bit to make it more readable.
+
+ * gtk/gtkhbox.[ch] (gtk_hbox_new),
+ gtk/gtkvbox.[ch] (gtk_vbox_new):
+ Change 'homogenous' arg from gint to gboolean.
+
+ * gtk/gtktogglebutton.[ch]:
+ New function gtk_toggle_button_get_active().
+
1999-01-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Allow button 2 to act
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 63d8f8766..48d68cf5e 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,16 @@
+1999-01-20 Jeff Garzik <jgarzik@pobox.com>
+
+ * gtk/gtkcombo.c (gtk_combo_entry_key_press):
+ Free 'nprefix', closing a memory leak.
+ Spaced out the code a bit to make it more readable.
+
+ * gtk/gtkhbox.[ch] (gtk_hbox_new),
+ gtk/gtkvbox.[ch] (gtk_vbox_new):
+ Change 'homogenous' arg from gint to gboolean.
+
+ * gtk/gtktogglebutton.[ch]:
+ New function gtk_toggle_button_get_active().
+
1999-01-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Allow button 2 to act
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 63d8f8766..48d68cf5e 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,16 @@
+1999-01-20 Jeff Garzik <jgarzik@pobox.com>
+
+ * gtk/gtkcombo.c (gtk_combo_entry_key_press):
+ Free 'nprefix', closing a memory leak.
+ Spaced out the code a bit to make it more readable.
+
+ * gtk/gtkhbox.[ch] (gtk_hbox_new),
+ gtk/gtkvbox.[ch] (gtk_vbox_new):
+ Change 'homogenous' arg from gint to gboolean.
+
+ * gtk/gtktogglebutton.[ch]:
+ New function gtk_toggle_button_get_active().
+
1999-01-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Allow button 2 to act
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 63d8f8766..48d68cf5e 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,16 @@
+1999-01-20 Jeff Garzik <jgarzik@pobox.com>
+
+ * gtk/gtkcombo.c (gtk_combo_entry_key_press):
+ Free 'nprefix', closing a memory leak.
+ Spaced out the code a bit to make it more readable.
+
+ * gtk/gtkhbox.[ch] (gtk_hbox_new),
+ gtk/gtkvbox.[ch] (gtk_vbox_new):
+ Change 'homogenous' arg from gint to gboolean.
+
+ * gtk/gtktogglebutton.[ch]:
+ New function gtk_toggle_button_get_active().
+
1999-01-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Allow button 2 to act
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 63d8f8766..48d68cf5e 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,16 @@
+1999-01-20 Jeff Garzik <jgarzik@pobox.com>
+
+ * gtk/gtkcombo.c (gtk_combo_entry_key_press):
+ Free 'nprefix', closing a memory leak.
+ Spaced out the code a bit to make it more readable.
+
+ * gtk/gtkhbox.[ch] (gtk_hbox_new),
+ gtk/gtkvbox.[ch] (gtk_vbox_new):
+ Change 'homogenous' arg from gint to gboolean.
+
+ * gtk/gtktogglebutton.[ch]:
+ New function gtk_toggle_button_get_active().
+
1999-01-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Allow button 2 to act
diff --git a/gtk/gtkcombo.c b/gtk/gtkcombo.c
index 8d29d206f..6857279e9 100644
--- a/gtk/gtkcombo.c
+++ b/gtk/gtkcombo.c
@@ -125,27 +125,37 @@ gtk_combo_entry_key_press (GtkEntry * entry, GdkEventKey * event, GtkCombo * com
gchar* nprefix = NULL;
gint pos;
- if ( !GTK_LIST(combo->list)->children )
+ if ( !GTK_LIST (combo->list)->children )
return FALSE;
gtk_signal_emit_stop_by_name (GTK_OBJECT (entry), "key_press_event");
- cmpl = g_completion_new((GCompletionFunc)gtk_combo_func);
- g_completion_add_items(cmpl, GTK_LIST(combo->list)->children);
- pos = GTK_EDITABLE(entry)->current_pos;
- prefix = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, pos);
+
+ cmpl = g_completion_new ((GCompletionFunc)gtk_combo_func);
+ g_completion_add_items (cmpl, GTK_LIST (combo->list)->children);
+
+ pos = GTK_EDITABLE (entry)->current_pos;
+ prefix = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, pos);
+
g_completion_complete(cmpl, prefix, &nprefix);
- if (nprefix && strlen(nprefix) > strlen(prefix))
+
+ if (nprefix && strlen (nprefix) > strlen (prefix))
{
- gtk_editable_insert_text(GTK_EDITABLE(entry), nprefix+pos,
- strlen(nprefix)-strlen(prefix), &pos);
- GTK_EDITABLE(entry)->current_pos = pos;
+ gtk_editable_insert_text (GTK_EDITABLE (entry), nprefix + pos,
+ strlen (nprefix) - strlen (prefix), &pos);
+ GTK_EDITABLE (entry)->current_pos = pos;
}
- g_free(prefix);
- g_completion_free(cmpl);
+
+ if (nprefix)
+ g_free (nprefix);
+ g_free (prefix);
+ g_completion_free (cmpl);
+
return TRUE;
}
+
if (!combo->use_arrows || !GTK_LIST (combo->list)->children)
return FALSE;
+
li = g_list_find (GTK_LIST (combo->list)->children, gtk_combo_find (combo));
if ((event->keyval == GDK_Up)
diff --git a/gtk/gtkhbox.c b/gtk/gtkhbox.c
index 0c10550b8..f705d9f56 100644
--- a/gtk/gtkhbox.c
+++ b/gtk/gtkhbox.c
@@ -69,7 +69,7 @@ gtk_hbox_init (GtkHBox *hbox)
}
GtkWidget*
-gtk_hbox_new (gint homogeneous,
+gtk_hbox_new (gboolean homogeneous,
gint spacing)
{
GtkHBox *hbox;
diff --git a/gtk/gtkhbox.h b/gtk/gtkhbox.h
index 5a326133d..0c3461057 100644
--- a/gtk/gtkhbox.h
+++ b/gtk/gtkhbox.h
@@ -51,7 +51,7 @@ struct _GtkHBoxClass
GtkType gtk_hbox_get_type (void);
-GtkWidget* gtk_hbox_new (gint homogeneous,
+GtkWidget* gtk_hbox_new (gboolean homogeneous,
gint spacing);
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index 732526cce..c5fbdb373 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -267,6 +267,7 @@ gtk_toggle_button_set_mode (GtkToggleButton *toggle_button,
}
}
+
void
gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
gboolean is_active)
@@ -280,6 +281,17 @@ gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
gtk_button_clicked (GTK_BUTTON (toggle_button));
}
+
+gboolean
+gtk_toggle_button_get_active (GtkToggleButton *toggle_button)
+{
+ g_return_val_if_fail (toggle_button != NULL, FALSE);
+ g_return_val_if_fail (GTK_IS_TOGGLE_BUTTON (toggle_button), FALSE);
+
+ return (toggle_button->active) ? TRUE : FALSE;
+}
+
+
void
gtk_toggle_button_toggled (GtkToggleButton *toggle_button)
{
diff --git a/gtk/gtktogglebutton.h b/gtk/gtktogglebutton.h
index bdb2a6e69..156dfb7e3 100644
--- a/gtk/gtktogglebutton.h
+++ b/gtk/gtktogglebutton.h
@@ -64,6 +64,7 @@ void gtk_toggle_button_set_mode (GtkToggleButton *toggle_button,
gboolean draw_indicator);
void gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
gboolean is_active);
+gboolean gtk_toggle_button_get_active (GtkToggleButton *toggle_button);
void gtk_toggle_button_toggled (GtkToggleButton *toggle_button);
diff --git a/gtk/gtkvbox.c b/gtk/gtkvbox.c
index cd48869cc..a4b8d031f 100644
--- a/gtk/gtkvbox.c
+++ b/gtk/gtkvbox.c
@@ -69,7 +69,7 @@ gtk_vbox_init (GtkVBox *vbox)
}
GtkWidget*
-gtk_vbox_new (gint homogeneous,
+gtk_vbox_new (gboolean homogeneous,
gint spacing)
{
GtkVBox *vbox;
diff --git a/gtk/gtkvbox.h b/gtk/gtkvbox.h
index ddebeadf9..2661df1ba 100644
--- a/gtk/gtkvbox.h
+++ b/gtk/gtkvbox.h
@@ -51,7 +51,7 @@ struct _GtkVBoxClass
GtkType gtk_vbox_get_type (void);
-GtkWidget* gtk_vbox_new (gint homogeneous,
+GtkWidget* gtk_vbox_new (gboolean homogeneous,
gint spacing);