~gue5t/midori/suggestion-regression

« back to all changes in this revision

Viewing changes to katze/katze-preferences.c

  • Committer: Christian Dywan
  • Date: 2011-04-14 01:29:50 UTC
  • Revision ID: git-v1:ed6ed712399a66b50197064ca5f5a68566f43f14
Embed extensions into preferences dialogue

MidoriBrowser gains the show-preferences signal which
gives API users a chance to add preferences.

katze_preferences_add_category now returns a box to
allow freely packing a widget into the page.

The extension panel is packed into the preferences now
rather than being appended as a proper panel.

Motivation is consistency here, such as with Gedit or
Emerillon and also the aspect that extensions often
really do tweak behaviour like preferences do.

Spacing and icons are added for visual consistency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
 * Adds a new category with the specified label to the dialog.
250
250
 *
251
251
 * Since: 0.2.1
 
252
 *
 
253
 * Since 0.3.4 a #GtkBox is returned that can be packed into.
252
254
 **/
253
 
void
 
255
GtkWidget*
254
256
katze_preferences_add_category (KatzePreferences* preferences,
255
257
                                const gchar*      label,
256
258
                                const gchar*      icon)
257
259
{
258
 
    KatzePreferencesPrivate* priv = preferences->priv;
 
260
    KatzePreferencesPrivate* priv;
 
261
 
 
262
    g_return_val_if_fail (KATZE_IS_PREFERENCES (preferences), NULL);
 
263
    g_return_val_if_fail (label != NULL, NULL);
 
264
    g_return_val_if_fail (icon != NULL, NULL);
 
265
 
 
266
    priv = preferences->priv;
259
267
 
260
268
    #if HAVE_HILDON
261
269
    GtkWidget* widget;
300
308
        g_object_set_data (G_OBJECT (priv->toolbutton), "notebook", priv->notebook);
301
309
    #endif
302
310
    #endif
 
311
 
 
312
    return priv->page;
303
313
}
304
314
 
305
315
#if !HAVE_HILDON
336
346
                             const gchar*      label)
337
347
{
338
348
    #if !HAVE_HILDON
339
 
    KatzePreferencesPrivate* priv = preferences->priv;
340
 
 
 
349
    KatzePreferencesPrivate* priv;
 
350
 
 
351
    g_return_if_fail (KATZE_IS_PREFERENCES (preferences));
 
352
    g_return_if_fail (label != NULL);
 
353
 
 
354
    priv = preferences->priv;
341
355
    priv->sizegroup2 = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
342
356
    priv->frame = katze_hig_frame_new (label);
343
357
    gtk_container_set_border_width (GTK_CONTAINER (priv->frame), 4);