mirror of
https://github.com/Cairo-Dock/cairo-dock-core.git
synced 2026-04-21 10:55:50 +02:00
Merge pull request #18 from mtasaka/help-pCategoryCombo-init
Help: initialize pCategoryCombo before used
This commit is contained in:
@@ -287,10 +287,6 @@ void cairo_dock_show_tips (void)
|
||||
pTips->iNumTipGroup = iNumTipGroup;
|
||||
pTips->iNumTipKey = iNumTipKey;
|
||||
|
||||
// update to the next tip.
|
||||
if (myData.iLastTipGroup >= 0 && myData.iLastTipKey >= 0) // a previous tip exist => take the next one;
|
||||
_cairo_dock_get_next_tip (pTips);
|
||||
|
||||
// build a list of the available groups.
|
||||
GtkWidget *pInteractiveWidget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
|
||||
GtkWidget *pComboBox = gtk_combo_box_text_new ();
|
||||
@@ -301,6 +297,11 @@ void cairo_dock_show_tips (void)
|
||||
}
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (pComboBox), pTips->iNumTipGroup);
|
||||
pTips->pCategoryCombo = pComboBox;
|
||||
|
||||
// update to the next tip.
|
||||
if (myData.iLastTipGroup >= 0 && myData.iLastTipKey >= 0) // a previous tip exist => take the next one;
|
||||
_cairo_dock_get_next_tip (pTips);
|
||||
|
||||
static gpointer data_combo[2];
|
||||
data_combo[0] = pTips; // the 2nd data is the dialog, we'll set it after we make it.
|
||||
g_signal_connect (G_OBJECT (pComboBox), "changed", G_CALLBACK(_on_tips_category_changed), data_combo);
|
||||
|
||||
Reference in New Issue
Block a user