OSDN Git Service

LinGui: refine the drop zone for queue drag n drop. now it only highlights
[handbrake-jp/handbrake-jp-git.git] / gtk / src / settings.c
index 4f2cacb..d7b824b 100644 (file)
@@ -193,19 +193,6 @@ ghb_settings_get_combo_option(GValue *settings, const gchar *key)
        return g_strdup(cd->option);
 }
 
-gchar*
-ghb_settings_get_combo_string(GValue *settings, const gchar *key)
-{
-       const GValue* value;
-       value = ghb_settings_get_value(settings, key);
-       if (value == NULL) return g_strdup("");
-       ghb_combodata_t *cd;
-       if (G_VALUE_TYPE(value) != ghb_combodata_get_type())
-               return g_strdup("");
-       cd = g_value_get_boxed(value);
-       return g_strdup(cd->svalue);
-}
-
 // Map widget names to setting keys
 // Widgets that map to settings have names
 // of this format: s_<setting key>
@@ -298,6 +285,9 @@ ghb_widget_value(GtkWidget *widget)
                                                           3, &ivalue, 4, &svalue, -1);
                        value = ghb_combo_value_new(index, option, shortOpt, 
                                                                                svalue, ivalue);
+                       g_free(option);
+                       g_free(shortOpt);
+                       g_free(svalue);
                }
                else
                {
@@ -426,7 +416,10 @@ ghb_widget_index(GtkWidget *widget)
        if (value == NULL) return 0;
        ghb_combodata_t *cd;
        if (G_VALUE_TYPE(value) != ghb_combodata_get_type())
+       {
+               ghb_value_free(value);
                return 0;
+       }
        cd = g_value_get_boxed(value);
        index = cd->index;
        ghb_value_free(value);