]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkprinteroptionset.c
Revert "combobox: Don't special-case RTL child positions anymore"
[~andy/gtk] / gtk / gtkprinteroptionset.c
index eb84a3448e09b540d70a05511558ee347317fa09..4041462c220c6531176122e507d9bc15b48b3390 100644 (file)
@@ -13,9 +13,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "config.h"
@@ -24,7 +22,6 @@
 #include <gmodule.h>
 
 #include "gtkprinteroptionset.h"
-#include "gtkalias.h"
 
 /*****************************************
  *         GtkPrinterOptionSet    *
@@ -144,17 +141,11 @@ gtk_printer_option_set_clear_conflicts (GtkPrinterOptionSet *set)
                                  NULL);
 }
 
-static int
-safe_strcmp (const char *a, const char *b)
-{
-  if (a == NULL)
-    a = "";
-  if (b == NULL)
-    b = "";
-
-  return strcmp (a, b);
-}
-
+/**
+ * gtk_printer_option_set_get_groups:
+ *
+ * Return value: (element-type utf8) (transfer full):
+ */
 GList *
 gtk_printer_option_set_get_groups (GtkPrinterOptionSet *set)
 {
@@ -166,7 +157,7 @@ gtk_printer_option_set_get_groups (GtkPrinterOptionSet *set)
     {
       option = g_ptr_array_index (set->array, i);
 
-      if (g_list_find_custom (list, option->group, (GCompareFunc)safe_strcmp) == NULL)
+      if (g_list_find_custom (list, option->group, (GCompareFunc)g_strcmp0) == NULL)
        list = g_list_prepend (list, g_strdup (option->group));
     }
 
@@ -186,8 +177,7 @@ gtk_printer_option_set_foreach_in_group (GtkPrinterOptionSet     *set,
     {
       option = g_ptr_array_index (set->array, i);
 
-      if (group == NULL ||
-         (option->group != NULL && strcmp (group, option->group) == 0))
+      if (group == NULL || g_strcmp0 (group, option->group) == 0)
        func (option, user_data);
     }
 }
@@ -199,7 +189,3 @@ gtk_printer_option_set_foreach (GtkPrinterOptionSet *set,
 {
   gtk_printer_option_set_foreach_in_group (set, NULL, func, user_data);
 }
-
-
-#define __GTK_PRINTER_OPTION_SET_C__
-#include "gtkaliasdef.c"